From 84869acc8b2df5bc2ad6de77fcd44a66f4cae439 Mon Sep 17 00:00:00 2001 From: sugar1569 Date: Thu, 14 Feb 2019 10:36:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=96=87=E7=AB=A0=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E4=B8=8D=E5=AD=98=E5=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/wap/model/wap/ArticleCategory.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/application/wap/model/wap/ArticleCategory.php b/application/wap/model/wap/ArticleCategory.php index 3320a04f..e0d768dd 100644 --- a/application/wap/model/wap/ArticleCategory.php +++ b/application/wap/model/wap/ArticleCategory.php @@ -21,7 +21,9 @@ class ArticleCategory extends ModelBasic public static function cidByArticleList($cid, $first, $limit, $field = '*') { $model = Db::name('article'); - if ($cid) $model->where("CONCAT(',',cid,',')", 'LIKE', "'%,$cid,%'"); - return $model->field($field)->where('status', 1)->where('hide', 0)->order('sort DESC,add_time DESC')->limit($first, $limit)->select(); + //if ($cid) $model->where("CONCAT(',',cid,',')", 'LIKE', "'%,$cid,%'"); + if ($cid) $model->where('cid',$cid); + return $model->field($field)->where('status', 1)->where('hide', 0)->order('sort DESC,add_time DESC')->limit($first, $limit)->select(); + } } \ No newline at end of file