Page 1 of 1

delete from multiple tables

Posted: Tue Oct 03, 2006 8:36 pm
by aceconcepts
Hi,

I'm trying to delete from two tables using:

Code: Select all

$query=mysql_query("DELETE FROM product_order WHERE order_id='$id'");

		$query=mysql_query("DELETE FROM order_details WHERE order_num='$id'");
But it's not working and no error is displayed!

$id is the product_id passed through the url (successfully).

What can i do?

Posted: Tue Oct 03, 2006 9:01 pm
by waradmin
Shouldnt $id be $_GET['id'], and do you need $query? cant you just do

Code: Select all

mysql_query("DELETE FROM whatever WHERE something=$id");