{"id":11346963,"date":"2019-03-23T12:09:15","date_gmt":"2019-03-23T12:09:15","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/sql-syntax-error-17\/"},"modified":"2019-03-23T12:09:15","modified_gmt":"2019-03-23T12:09:15","slug":"sql-syntax-error-17","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/sql-syntax-error-17\/","title":{"rendered":"SQL Syntax Error"},"content":{"rendered":"<p>Hi,<\/p>\n<p>After the most recent update, db errors show up in debug when creating a new gallery. Also, after saving the draft, when I click on Edit Gallery, the dialogue shows the thumbnails of ALL image files. I tried the same in an existing gallery and then the dialogue shows the gallery thumbnails as expected.<\/p>\n<pre><code>[23-Mar-2019 11:49:02 UTC] 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 &#039;)&#039; at line 5 for query SELECT p.ID id, p.post_excerpt caption, m.meta_value meta\n\t\t\tFROM wp_pqjj_posts p, wp_pqjj_postmeta m\n\t\t\tWHERE m.meta_key = &#039;_wp_attachment_metadata&#039;\n\t\t\tAND p.ID = m.post_id\n\t\t\tAND p.ID IN (,) made by require(&#039;wp-blog-header.php&#039;), wp, WP-&gt;main, WP-&gt;parse_request, do_action_ref_array(&#039;parse_request&#039;), WP_Hook-&gt;do_action, WP_Hook-&gt;apply_filters, rest_api_loaded, WP_REST_Server-&gt;serve_request, WP_REST_Server-&gt;dispatch, Meow_Gallery_Run-&gt;preview, Meow_Gallery_Run-&gt;gallery, Meow_Tiles_Generator-&gt;build, Meow_Gallery_Generator-&gt;prepare_data<\/code><\/pre>\n<pre><code>[23-Mar-2019 11:49:02 UTC] 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 &#039;,,)&#039; at line 5 for query SELECT p.ID id, p.post_excerpt caption, m.meta_value meta\n\t\t\tFROM wp_pqjj_posts p, wp_pqjj_postmeta m\n\t\t\tWHERE m.meta_key = &#039;_wp_attachment_metadata&#039;\n\t\t\tAND p.ID = m.post_id\n\t\t\tAND p.ID IN (,,,) made by require(&#039;wp-blog-header.php&#039;), wp, WP-&gt;main, WP-&gt;parse_request, do_action_ref_array(&#039;parse_request&#039;), WP_Hook-&gt;do_action, WP_Hook-&gt;apply_filters, rest_api_loaded, WP_REST_Server-&gt;serve_request, WP_REST_Server-&gt;dispatch, Meow_Gallery_Run-&gt;preview, Meow_Gallery_Run-&gt;gallery, Meow_Tiles_Generator-&gt;build, Meow_Gallery_Generator-&gt;prepare_data<\/code><\/pre>\n<p><code>AND p.ID IN (,,,)<\/code> iterates and then further down the list it starts to show the actual p.ID:<\/p>\n<pre><code>[23-Mar-2019 11:49:06 UTC] 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 &#039;,,,,)&#039; at line 5 for query SELECT p.ID id, p.post_excerpt caption, m.meta_value meta\n\t\t\tFROM wp_pqjj_posts p, wp_pqjj_postmeta m\n\t\t\tWHERE m.meta_key = &#039;_wp_attachment_metadata&#039;\n\t\t\tAND p.ID = m.post_id\n\t\t\tAND p.ID IN (,,,,,) made by require(&#039;wp-blog-header.php&#039;), wp, WP-&gt;main, WP-&gt;parse_request, do_action_ref_array(&#039;parse_request&#039;), WP_Hook-&gt;do_action, WP_Hook-&gt;apply_filters, rest_api_loaded, WP_REST_Server-&gt;serve_request, WP_REST_Server-&gt;dispatch, Meow_Gallery_Run-&gt;preview, Meow_Gallery_Run-&gt;gallery, Meow_Tiles_Generator-&gt;build, Meow_Gallery_Generator-&gt;prepare_data\n[23-Mar-2019 11:49:09 UTC] 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 &#039;,,,,,,,,,,,)&#039; at line 5 for query SELECT p.ID id, p.post_excerpt caption, m.meta_value meta\n\t\t\tFROM wp_pqjj_posts p, wp_pqjj_postmeta m\n\t\t\tWHERE m.meta_key = &#039;_wp_attachment_metadata&#039;\n\t\t\tAND p.ID = m.post_id\n\t\t\tAND p.ID IN (8393,,,,,,,,,,,,,) made by require(&#039;wp-blog-header.php&#039;), wp, WP-&gt;main, WP-&gt;parse_request, do_action_ref_array(&#039;parse_request&#039;), WP_Hook-&gt;do_action, WP_Hook-&gt;apply_filters, rest_api_loaded, WP_REST_Server-&gt;serve_request, WP_REST_Server-&gt;dispatch, Meow_Gallery_Run-&gt;preview, Meow_Gallery_Run-&gt;gallery, Meow_Tiles_Generator-&gt;build, Meow_Gallery_Generator-&gt;prepare_data<\/code><\/pre>\n","protected":false},"template":"","class_list":["post-11346963","topic","type-topic","status-publish","hentry","topic-tag-illegal-string-offset"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/11346963","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/11346963\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=11346963"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}