Title: SQL syntax error
Last modified: October 8, 2025

---

# SQL syntax error

 *  Resolved [Andrea Lincetto](https://wordpress.org/support/users/lincetto/)
 * (@lincetto)
 * [8 months ago](https://wordpress.org/support/topic/sql-syntax-error-27/)
 * Hi, in the log we are getting this error
   `[08-Oct-2025 08:16:46 UTC] WordPress
   database error You have an error in your SQL syntax; check the manual that corresponds
   to your MariaDB server version for the right syntax to use near 'AND id IN (21,22,23)
   ORDER BY parent_id ASC' at line 1 for query SELECT id, category_name as name,
   icon, ordr, parent_id FROM wp_asl_categories WHERE lang = '' AND AND id IN (21,22,23)
   ORDER BY parent_id ASC made by require('wp-blog-header.php'), require_once('wp-
   includes/template-loader.php'), include('/themes/flatsome/page-blank.php'), the_content,
   apply_filters('the_content'), WP_Hook->apply_filters, do_shortcode, preg_replace_callback,
   do_shortcode_tag, AgileStoreLocator\Frontend\App->frontendStoreLocator, AgileStoreLocator\
   Model\Category::get_app_categories`
 * What could be the cause?
 * Thanks

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

 *  Plugin Support [masdhrn](https://wordpress.org/support/users/masdhrn/)
 * (@masdhrn)
 * [8 months ago](https://wordpress.org/support/topic/sql-syntax-error-27/#post-18673386)
 * Hi, there was an issue with the older version, which version of the plugin you
   are using? if you are using pro version please create a support ticket by emailing
   us at [support@agilelogix.com](https://wordpress.org/support/topic/sql-syntax-error-27/support@agilelogix.com?output_format=md)
 * Thank you
 *  Thread Starter [Andrea Lincetto](https://wordpress.org/support/users/lincetto/)
 * (@lincetto)
 * [7 months, 4 weeks ago](https://wordpress.org/support/topic/sql-syntax-error-27/#post-18677294)
 * Hi, we are using the latest version of the free plugin
 * Andrea
 *  Plugin Support [masdhrn](https://wordpress.org/support/users/masdhrn/)
 * (@masdhrn)
 * [7 months, 3 weeks ago](https://wordpress.org/support/topic/sql-syntax-error-27/#post-18679383)
 * We will release an update tomorrow to validate that no extra AND add up to it,
   with some other updates.
 * Thank you
 *  Plugin Support [masdhrn](https://wordpress.org/support/users/masdhrn/)
 * (@masdhrn)
 * [7 months, 3 weeks ago](https://wordpress.org/support/topic/sql-syntax-error-27/#post-18682732)
 * Hi, thank you for highlighting it was happening when category attribute was added
   in the shortcode, we have released 1.6.1 with the fix for it.

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

The topic ‘SQL syntax error’ is closed to new replies.

 * ![](https://ps.w.org/agile-store-locator/assets/icon-128x128.png?rev=2780478)
 * [Store Locator WordPress](https://wordpress.org/plugins/agile-store-locator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/agile-store-locator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/agile-store-locator/)
 * [Active Topics](https://wordpress.org/support/plugin/agile-store-locator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/agile-store-locator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/agile-store-locator/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [masdhrn](https://wordpress.org/support/users/masdhrn/)
 * Last activity: [7 months, 3 weeks ago](https://wordpress.org/support/topic/sql-syntax-error-27/#post-18682732)
 * Status: resolved