What database are you using? If it's MySQL then you will have to issue 2 delete statements. one for links and the other for categories.
If you are using a RDBMS that allows for triggers you can setup a cascading delete trigger will delete all the children records in links when you delete a category from categories.
The other thing you can do, in PHP, is to create an object called categories that has a method called delete. Then in your method put all the code to delete form both tables. You are still issuing 2 delete statements but you are grouping them in one piece of code. (IMHO, this is a better way anyhow. I'm not a big fan of triggers. If you are not careful, they can introduce performance problems in your system.
IMHO,
Cal
Cal Evans
- Senior Internet Dreamer
- Techno-Mage
- Last of the great Internet Burma-Shave poets.
http://www.calevans.com
*