易优cms筛选字段调用其他频道数据字段教程
作者: 本站原创 发布时间: 浏览: 次
易优cms筛选调用其他频道模型字段可以采用php标签来进行调用,具体代码如下:
{eyou:php}$sql = “select a.title,a.aid,b.tuanjianleixing FROM ey_archives as a,ey_fangan_content as b where a.aid=b.aid and is_recom=1 order by id desc limit 6”;
$tmp_list = db()->query($sql);
foreach ($tmp_list as $_k => $_v) {
echo “栏目ID:”.$_v[‘tuanjianleixing’];
echo ” — “;
echo “标题:”.$_v[‘title’];
echo ” — “;
echo “标题/index.php?m=home&c=View&a=index&aid=”.$_v[‘aid’];
echo “<br/>”;
}
{/eyou:php}