...

View Full Version : Multiple Table delete



moos3
08-22-2007, 02:07 PM
I have 3 tables that all have b_id in them. Blog table has b_id, title,author,body,date then I have a tags table that has t_id,name,b_id_blog and a comments table that has c_id,c_body,c_name,c_email,c_url,b_id_blog. My question how can I remove all data from the 3 tables based off the b_id?

clunky
08-22-2007, 03:41 PM
Hi moos3
you could try an sql such as..

delete * from Blog, tags, comments where b_id='whatever_you_choose'

may work :-)

Pennimus
08-22-2007, 03:48 PM
What's wrong with doing three ordinary DELETE queries where b_id='xyz'?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum