From adf490f90eddc28462906a22b6b05627379e16cc Mon Sep 17 00:00:00 2001 From: pengda <10266652509@qq.com> Date: Thu, 21 Nov 2024 09:54:54 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8D=AF=E6=96=B9=E6=8E=92=E5=BA=8F=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/mFormula.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/mFormula.php b/model/mFormula.php index eb6e98e..cc73035 100644 --- a/model/mFormula.php +++ b/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');