Maybe i'm just tired but this is really bugging me, this is not working. where $invoiceid=1 $checkfororder = mysql_query("SELECT * FROM shop_sales_flat_order WHERE ext_order_id = ".$invoiceid)or die(mysql_error()); PHP: I get You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE ext_order_id = 1' at line 1 Code (markup): I have also tried with no success $checkfororder = mysql_query("SELECT * FROM shop_sales_flat_order WHERE ext_order_id = '".$invoiceid."'")or die(mysql_error()); $checkfororder = mysql_query("SELECT * FROM shop_sales_flat_order WHERE ext_order_id = $invoiceid")or die(mysql_error()); $checkfororder = mysql_query("SELECT * FROM shop_sales_flat_order WHERE ext_order_id = '$invoiceid'")or die(mysql_error()); PHP: Thanks for any help
Possibly rewrite the entire query by hand. It's possible a hidden or other character is causing a problem. Do you have command line or phpmyadmin access to the database. Might try running it via command and see if it spits out the same error.
I have no problem running it in phpmyadmin. I rewrote the mysql statement and nothing changed Thanks for the help though