我想学习如何通过WP而不是SQL命令运行命令
我有一个SQL命令:
SELECT
post_id,
(select meta_value from wp_postmeta where meta_key = a \'geo_latitude\' AND x.post_id = a.post_id) as lat is NOT NULL,
(select meta_value from wp_postmeta where meta_key = b \'geo_longitude\' AND x.post_id = b.post_id) as lon is NOT NULL,
(select meta_value from wp_postmeta where meta_key = c \'address\' AND x.post_id = c.post_id) as the address is NOT NULL
FROM elreal_postmeta x group by post_id, lat, lon, address
我可以将此命令运行到
wpdb
班