We had a PHP/MySQL website which worked fine on the production server but on the testing server running WAMP (Windows-Apache-MySQL-PHP) certain dynamic pages gave us this error:

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 ” at line 1

We double checked the code and everything looked fine so figured it must be a PHP/MySQL setting on the WAMP server.



Seems that register_long_arrays was not enabled in the PHP settings on the WAMP server. As soon as we enabled them it worked perfectly.