Multiple table delete.

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
dreamline
Forum Contributor
Posts: 158
Joined: Fri May 28, 2004 2:37 am

Multiple table delete.

Post by dreamline »

Hi Guyz,
I've been doing some reading at the msyql site on multiple table deletes however i've tried about every thing in my power to get it to work but didn't get it right... So hopefully someone here can help me out...

K, here's the thing.. I've got a user table and i've got a posts table. When A user deletes his/her account I want to delete all posts too. Now here's the problem a user might not have posted anything so his/her ID isn't in the posts table.

How would I go creating a query with multiple table deletes. I've tried the examples written at mysql.com, and read the join syntax and tried some queries with that..

I've checked some posts here but they all refer to the mysql documentation which isn't working for me.. LOL

Can someone help me out?

Thanks.. :D
Post Reply