易优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}
发表评论
评论列表(条)