@@ -19,7 +19,7 @@ class Base extends Controller
}
// 找到所有商品,判断商品是否在标签内
- $ta = db('good')->field('id, title, tags_id')->select();
+ $ta = db('good')->field('id, title, tags_id')->where('tags_id','<>','')->select();//查询出tags_id不为空的所有数据
foreach ($ta as $val) {
$tag_ids = explode(',', $val['tags_id']);