我希望有人能帮助我。。。。。。。。。。。。。
我有一个
经销商发布类型-->分类-->状态-->如何以此格式编写sql查询
$catinfo1 = $wpdb->get_results("select t.*,(select count(tr.object_id) from $wpdb->term_relationships tr join $wpdb->posts p on p.ID=tr.object_id where tt.term_taxonomy_id=tr.term_taxonomy_id and p.post_status=\'publish\') pcount from $wpdb->terms t join $wpdb->term_taxonomy tt on tt.term_id=t.term_id where tt.taxonomy=\\"fueltype\\" and tt.parent=0 order by t.name");