How to delete Data from multiple tables.
For example Iam having category id in one data base table .in another data base table iam having this id if i delete category id it should display a message as first delete in that table if the id is there in that database then nor then it can delete.
ashalatha
0
Light Poster
Recommended Answers
Jump to PostYou can use
ON DELETE CASCADE
option in mysql
By using this, on deleting the record from parent table removes the records from child tables.Please check this article for more details and for examples
http://dev.mysql.com/doc/refman/5.5/en/innodb-foreign-key-constraints.html
All 3 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.