Can I send any query through PHP? For example this query works fine in PHPmyAdmin but I can’t seem to send it through PHP without getting an error.
"UPDATE `lesson_content` SET `display_order` = '4' WHERE `id` = '4' LIMIT 1; UPDATE `lesson_content` SET `display_order` = '3' WHERE `id` = '3' LIMIT 1; UPDATE `lesson_content` SET `display_order` = '2' WHERE `id` = '2' LIMIT 1; UPDATE `lesson_content` SET `display_order` = '1' WHERE `id` = '1' LIMIT 1;"
and the PHP mysql error is:
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 ‘; UPDATE
lesson_content
SETdisplay_order
= ‘3’ WHEREid
= ‘3’ LIMIT 1; U’ at line 1
Is there another way I could format it?