|
|
@@ -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();
|
|
|
+
|
|
|
}
|
|
|
}
|