View Full Version : Multiple Table delete
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?
08-22-2007, 03:41 PM
you could try an sql such as..
delete * from Blog, tags, comments where b_id='whatever_you_choose'
may work :-)
08-22-2007, 03:48 PM
What's wrong with doing three ordinary DELETE queries where b_id='xyz'?
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.