{"id":7067322,"date":"2016-02-15T18:08:54","date_gmt":"2016-02-15T18:08:54","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/sql-statement\/"},"modified":"2016-08-31T13:28:38","modified_gmt":"2016-08-31T13:28:38","slug":"sql-statement","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/sql-statement\/","title":{"rendered":"SQL Statement"},"content":{"rendered":"<p>Hi,<br \/>\nI try to add for the export a field based on a SQL Query.<br \/>\nI want to use the ID from the current object to select an item.<br \/>\nI tried this:<br \/>\nSELECT post_id FROM wp_postmeta WHERE meta_key LIKE &#8216;_wpcf_belongs_anbieter_id&#8217; AND meta_value = ID Limit 1;<br \/>\nBut this doesn&#8217;t work.<br \/>\nIf I change from ID to 153 ( the id \ud83d\ude42 ) it works well.<br \/>\nI use a wp-types custom post type.<\/p>\n<p>Thanks for support<br \/>\nStefan<\/p>\n<p>https:\/\/wordpress.org\/plugins\/wp-all-export\/<\/p>\n","protected":false},"template":"","class_list":["post-7067322","topic","type-topic","status-publish","hentry","topic-tag-request","topic-tag-sql-query"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/7067322","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\/7067322\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=7067322"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}