Hi! I hope, I understood you right: You want to delete a user completely from your database? If yes, you can just do it step by step (I hope the last step - putting all the queries together works):
$uid = 1; $qry = 'SELECT `Allocation_ID` FROM `WMS_Allocations` WHERE `User_ID`='.$uid; $ent = mysql_fetch_array(mysql_query($qry)); $del_qry1 = 'DELETE FROM `WMS_Allocations` WHERE `User_ID`='.$uid; $del_qry2 = 'DELETE FROM `WMS_Bookings` WHERE `Allocation_ID`='.$ent['Allocation_ID']; $del_qry3 = 'DELETE FROM `WMS_User` WHERE `User_ID`='.$uid; $del_qry = $del_qry1.";\n".$del_qry2.";\n".$del_qry3.";\n"; mysql_query($del_qry); -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php