1.JOIN查询:
{assign name="rssonid" value=":getsonid(2)" /}{rs id="rs" top="10" table="xiy_content" where="classid in ($rssonid) and islock=0" join="LEFT JOIN xiy_model_news ON xiy_model_news.cid=xiy_content.id" order="ordernum asc,createdate desc,id desc" key="i" mod="3"}{:getsubstr($rs.title,0,40)}输出自定义字段:{$rs.自定义字段}{/rs}JOIN查询常用于自定义字段的输出
其中join语句中的 xiy_model_news 是你要外链接的表
评论
发表
