PDA

View Full Version : SOLVE! - Mysql / vb php : Deleting multiple rows with same id


Vaupell
02-16-2009, 03:10 PM
Have a option where it is possible to delete a category
AND its contents.

Category name = Cname, Id = Cid,

problem : The contents are not store in same db as the category list

solved!

----- This works -------------
$result = $vbulletin->db->query("SELECT * FROM " . TABLE_PREFIX . "Myothertable WHERE CATID='".$catid."'");
While ($row = $vbulletin->db->fetch_array($result)) {
$db->query_write("DELETE FROM ".TABLE_PREFIX."Myothertable WHERE CATID='".$catid."'");
}