|
|
|
|
@ -599,10 +599,10 @@ select combo_id as c_id,count(*) as sale_count from orders where status in(2,4)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$ids= "'" . implode("','", $topTwoIndexes) . "'";
|
|
|
|
|
|
|
|
|
|
$sex=$person->sex;
|
|
|
|
|
$combos = DB::select("select * from combos as a LEFT JOIN (
|
|
|
|
|
select combo_id as c_id,count(*) as count from orders where status in(2,4) group by combo_id
|
|
|
|
|
) as b on a.combo_id=b.c_id where a.status=1 and a.combo_id in (".$ids.")");
|
|
|
|
|
) as b on a.combo_id=b.c_id where a.status=1 and a.combo_id in (".$ids.") and a.sex in(".$sex.",0)");
|
|
|
|
|
|
|
|
|
|
foreach ($combos as $key => $combo) {
|
|
|
|
|
|
|
|
|
|
|