Title: Error in your SQL syntax
Last modified: October 7, 2019

---

# Error in your SQL syntax

 *  Resolved [thaneros](https://wordpress.org/support/users/thaneros/)
 * (@thaneros)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/error-in-your-sql-syntax-5/)
 * Since I am using this plugin, I have an error in the php log file:
 * WordPress database 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‘
   order ASC’ at line 8 for query SELECT * ,(SELECT GROUP_CONCAT( psl0_tb.related_item_id
   ORDER BY psl0_tb.weight ASC SEPARATOR “,” ) FROM `wp_podsrel` AS psl0_tb WHERE
   psl0_tb.pod_id = “294” AND psl0_tb.field_id = “300” AND psl0_tb.item_id = pod_tb.
   id GROUP BY psl0_tb.item_id) AS media FROM `wp_pods_product_photo` AS pod_tb 
   WHERE 1=1 AND `pandarf_parent_pod_id` = 265 AND `pandarf_parent_post_id` = 633
   AND `pandarf_pod_field_id` = 301 ORDER BY order ASC made by wp_trash_post, wp_update_post,
   wp_insert_post, apply_filters(‘wp_insert_post_data’), WP_Hook->apply_filters,
   PodsMeta->save_post_track_changed_fields, PodsAPI::handle_changed_fields, Pods-
   >export, PodsAPI->export_pod_item, PodsAPI->export_pod_item_level, Pods->field,
   apply_filters(‘pods_pods_field’), WP_Hook->apply_filters, pandarf_pods_field_fn,
   pandarf_items_fn

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Coding Panda](https://wordpress.org/support/users/codingpanda/)
 * (@codingpanda)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/error-in-your-sql-syntax-5/#post-12007847)
 * Hi [@thaneros](https://wordpress.org/support/users/thaneros/)
 * ‘order’ is a reserved word in MySQL ([https://doc.ispirer.com/sqlways/Output/SQLWays-1-205.html](https://doc.ispirer.com/sqlways/Output/SQLWays-1-205.html))
 * It looks like you have a field named ‘order’. If yes, would you change it to 
   something else and see if this error still occurs?
 * Please let me know if the problem persists after the change.
 * If `order` is not the problem, would you export the relevant Pods settings with
   the “Migrate: Packages” component, and give me the JSON string so I can do further
   investigation?
 * Thanks for using the plugin.
 *  Thread Starter [thaneros](https://wordpress.org/support/users/thaneros/)
 * (@thaneros)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/error-in-your-sql-syntax-5/#post-12021371)
 * Hi [@codingpanda](https://wordpress.org/support/users/codingpanda/) ,
 * You are right, it was because of the order field.
 * Thanks for helping!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Error in your SQL syntax’ is closed to new replies.

 * ![](https://ps.w.org/panda-pods-repeater-field/assets/icon-128x128.png?rev=1520380)
 * [Panda Pods Repeater Field](https://wordpress.org/plugins/panda-pods-repeater-field/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/panda-pods-repeater-field/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/panda-pods-repeater-field/)
 * [Active Topics](https://wordpress.org/support/plugin/panda-pods-repeater-field/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/panda-pods-repeater-field/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/panda-pods-repeater-field/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [thaneros](https://wordpress.org/support/users/thaneros/)
 * Last activity: [6 years, 8 months ago](https://wordpress.org/support/topic/error-in-your-sql-syntax-5/#post-12021371)
 * Status: resolved