联系电话:020-28187900

双分类调用标签

发表时间:2012-08-24 阅读: 2663

双分类调用原理:调用同时属于分类一和分类二双条件的文章,在K9中得3表关联调用了。

标签以下:

{@res.join table1='%s_content_categroy_bind' table2='%s_content'field2='title,url,date'table3='%s_content_categroy_bind' on='id' where='t2.mid=1 and t2.status=1 and t1.cid=1 and t3.cid=5' order='t2.id desc' number='6'}
{#foreach($res as $rs)}
<li><a href="{DIR}{$rs[url]}" title="{$rs[title]}">{$rs[title] size="32"}</a><span>{$rs[date] date='Y-m-d'}</span></li>
{#endforeach}
说明:

调用同时属于cid=1的分类和cid=5的分类文章,是与关系

转载请注明出处:唯众网络


相关教程 【更多】

唯众网络