Unable to select Database: SELECT count(*) AS cnt FROM wp_posts WHERE wp_posts.post_parent = AND post_status='publish'