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