WordPress SQL syntax error, works fine in phpMyAdmin

Solution:

You can’t run multiple queries in a single statement.

 

phpMyAdmin parses the SQL you enter so it handles multiple queries by extracting them and executing them one by one.