I have three tables in my test db. we will call them, "category","item" and "data". What I want to do it have a delete statement that will remove the selected "category" ID then look for "items" or "data" that are associated with the "category" being deleted.
I am not sure how to do this, but I believe it's possible. the "category" ID is also refered to in the "item" table but the "data" table does not have a "category" ID, rather the "data" table has an "item" ID referenced to the "item" table. An illustration of sorts:
Category
catid
catname
Item
itemid
itemname
catid
Data
dataid
dataname
itemid
Anyone know how to properly set it up to determine if there is any data in "item" or "data" to be deleted once the "category" table is set for deletion?
Thanks in advance!
Web site design, internet marketing, SEO and business solutions company.
I am not sure how to do this, but I believe it's possible. the "category" ID is also refered to in the "item" table but the "data" table does not have a "category" ID, rather the "data" table has an "item" ID referenced to the "item" table. An illustration of sorts:
Category
catid
catname
Item
itemid
itemname
catid
Data
dataid
dataname
itemid
Anyone know how to properly set it up to determine if there is any data in "item" or "data" to be deleted once the "category" table is set for deletion?
Thanks in advance!
Web site design, internet marketing, SEO and business solutions company.