Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

1065 - Query was empty


ryanf

Recommended Posts

Posted

Hello, I am writing this simple php page that deletes a record from the database but after it completes, it gives me 1065 - Query was empty on the resulting page. I know it is deleting a record as I am looking with phpmyadmin. Heres the code I got:

 

$result = tep_db_query('      DELETE      FROM     	 '.TABLE_CATEGORIES.'   	 WHERE     	 category_id = ' . $cat_id   	 );
$result = tep_db_query($sql);  

 

Anyone got any ideas?

 

Thanks

If I was crafty, this would be a funny signature.

Posted

Looks like you assign the resource ID to $result with the first query then the second you try to reassign another resource ID to the same variable with an empty $sql var.

 

Bobby

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...