\Phpcmf\Service::M()->table(SITE_ID.'_news')->getAll();
NEWS 模块,我做了个字段,是联动菜单,address 那个
请问,使用第一行那个代码,如果查询联动菜单??
好像是需要分辨联动数据是 一级 还是二级,写法好像不一样
比如我 有一条数据,联动的是 ,广东,广州,荔湾区
如果我要查询 广东的话,下面如何写
\Phpcmf\Service::M()->table(SITE_ID.'_news')->getAll();
如果要查询 二级(广州)或者(荔湾区)又该如何写?
$data = dr_linkage('address', 999); if ($data) { if ($data['child']) { $where = '`联动字段` IN ('.$data['childids'].')'; } else { $where = '`联动字段`='.intval($data['ii']); } \Phpcmf\Service::M()->table(SITE_ID.'_news')->where($where)->getAll(); }