Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

1065 - Query was empty


Recommended Posts

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?



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

Link to comment
Share on other sites

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.



Link to comment
Share on other sites


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

  • Create New...