这是我的查询:正被选择MySQL的:选择一排,其中一列等于ID
SELECT ID FROM wp_posts
WHERE post_type = 'vreb_property'
AND post_status = 'publish'
ORDER BY post_modified DESC
在这种情况下,我需要修改我的查询,包括WHERE post_parent = ID
...这样的ID,我需要使用。
SELECT ID FROM wp_posts WHERE post_type = 'vreb_property' ... and also select records where 'post_parent' = ID
因为有是post_type
“附件”,我需要抓住的记录。
为了澄清这个请求的有效性,我可以多看几眼吗?谢谢。
您在查询中传递的已知ID? – 2012-12-20 00:38:55
呃,比这更复杂一点......我编辑了上面的问答。 – dcolumbus