我在这个查询中做错了什么?我想从一个名为events and order by the event date的自定义帖子类型中选择事件,并且只显示当前日期之后的事件。它似乎不起作用。。。
$querystr = "
SELECT $wpdb->posts.*
FROM $wpdb->posts, $wpdb->postmeta
WHERE $wpdb->posts.ID = $wpdb->postmeta.post_id
AND $wpdb->postmeta.meta_key = \'wpcf-start-date\'
AND $wpdb->postmeta.meta_value >= CURDATE()
AND $wpdb->posts.post_status = \'publish\'
AND $wpdb->posts.post_type = \'events\'
ORDER BY $wpdb->postmeta.meta_value ASC
";