多选联动菜单字段如何统计
字段aaa是栏目模型字段,要在loop中统计这个字段值的内容数量
{category_search_field module=demo catid=$catid return=c1} {loop $c1.data $v} {php echo\Phpcmf\Service::M()->db->table('1_demo_category_data')->where('catid', $cat.id)->where($c1.field, $v['value'])->countAllResults();} {/loop} {/category_search_field}
由于字段是联动多选,数据表中是这样:
["1","2"]
where($c1.field, $v['value']) 这个条件应该怎么写