Invalid query: No database selected Whole query: SELECT count(*) AS 'count' FROM `avwp_posts` WHERE `post_type` = 'dc_contactme';