{"id":6778945,"date":"2015-11-23T16:27:35","date_gmt":"2015-11-23T16:27:35","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/error-686\/"},"modified":"2016-08-30T20:35:05","modified_gmt":"2016-08-30T20:35:05","slug":"error-686","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/error-686\/","title":{"rendered":"Error"},"content":{"rendered":"<p>This throws an error :<br \/>\nSELECT distinct(meta_value)   FROM wp_usermeta where meta_key = &#8216;billing_state&#8217; <\/p>\n<p>even though I run the same query in phpMyAdmin.<\/p>\n<p>Here&#8217;s the error :<br \/>\nFatal error: Uncaught exception &#8216;MDatabaseException&#8217; with message &#8216;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 &#8216;\\&#8217;billing_state\\&#8221; at line 1 SQL=SELECT distinct(meta_value) FROM wp_usermeta where meta_key = \\&#8217;billing_state\\&#8221; in C:\\xampp\\htdocs\\wordpress431\\wp-content\\miwi\\framework\\database\\database\\mysql.php:300 Stack trace: #0 C:\\xampp\\htdocs\\wordpress431\\wp-content\\miwi\\framework\\database\\database.php(410): MDatabaseMySQL-&gt;execute() #1 C:\\xampp\\htdocs\\wordpress431\\wp-content\\plugins\\miwosql\\admin\\models\\miwosql.php(234): MDatabase-&gt;loadAssocList() #2 C:\\xampp\\htdocs\\wordpress431\\wp-content\\plugins\\miwosql\\admin\\models\\miwosql.php(53): MiwosqlModelMiwosql-&gt;_getHtmlTable(&#8216;SELECT distinct&#8230;&#8217;, 0, Object(MDatabaseMySQL)) #3 C:\\xampp\\htdocs\\wordpress431\\wp-content\\miwi\\framework\\application\\component\\view.php(124): MiwosqlModelMiwosql-&gt;getData() #4 C:\\xampp\\htdocs\\wordpress431\\wp-content\\plugins\\miwosql\\admin\\views\\miwosql\\view.html in C:\\xampp\\htdocs\\wordpress431\\wp-content\\miwi\\framework\\database\\database\\mysql.php on line 300<\/p>\n<p>https:\/\/wordpress.org\/plugins\/miwosql\/<\/p>\n","protected":false},"template":"","class_list":["post-6778945","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/6778945","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\/6778945\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=6778945"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}