|
$sql="SELECT * FROM (SELECT `sample_id`,COUNT(`sample_id`) as 'qty' FROM `t_aci_test_sample_lable_list` group by `sample_id`) c LEFT JOIN (SELECT * FROM `t_aci_test_sample_list` a left JOIN `t_aci_test_list` USING(`test_id`)) d USING(`sample_id`) where `test_id`=".$id;
如何使用CI查询构造器查询以上内容? |
|