SELECT `wp3_posts` . `ID` FROM `wp3_posts` WHERE ? = ? AND `wp3_posts` . `post_parent` = ? AND ( `wp3_posts` . `post_mime_type` LIKE ? ) AND `wp3_posts` . `post_type` = ? AND ( ( `wp3_posts` . `post_status` = ? ) ) ORDER BY `wp3_posts` . `menu_order` ASC LIMIT ?, ... 