WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND (p.post_type IN('turf') AND tt.taxonomy IN('location'))
GROUP BY t.' at line 10]SELECT t.*, COUNT(*), r.*, tt.* from wp_terms AS t
, wp_term_taxonomy AS tt
, wp_term_relationships AS r
, wp_posts AS p
WHERE
t.term_id = tt.term_id
AND r.term_taxonomy_id = tt.term_taxonomy_id
AND p.ID = r.object_id
AND tt.parent =
AND (p.post_type IN('turf') AND tt.taxonomy IN('location'))
GROUP BY t.term_id
