Browse Source

药方排序修改

pull/36/head
pengda 6 months ago
parent
commit
adf490f90e
  1. 2
      model/mFormula.php

2
model/mFormula.php

@ -47,7 +47,7 @@ class mFormula extends mBase {
}
}
$sql = "select s.*,COALESCE(u.use_num, 0) AS use_num from {$this->tbl} as s left join {$this->formula_use_log_tbl} as u on s.id=u.formula_id and u.uid={$uid} where {$where} group by s.id order by use_num desc,s.sort desc,s.id desc limit {$offset},{$page_size}";
$sql = "select s.*,COALESCE(u.use_num, 0) AS use_num from {$this->tbl} as s left join {$this->formula_use_log_tbl} as u on s.id=u.formula_id and u.uid={$uid} where {$where} group by s.id order by use_num desc,s.sort desc,s.id asc limit {$offset},{$page_size}";
$data = $this->obj->execute($sql, true, true);
$formula_ids = array_column($data, 'id');

Loading…
Cancel
Save