PHPCMS get推荐位文章代码

2012-11-13 浏览:1106
PHPCMS get推荐位文章代码
评论:(0)复制地址

多个推荐位代码:

{pc:get sql="SELECT * FROM v9_news WHERE id IN (SELECT id FROM v9_position_data WHERE posid in(2,3) and catid in(19,20,21,22,23,24,25,26,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43)) order by id DESC" num="1" return="data"}
                                                        {loop $data $n $r}                                                       
                                                    <h1><a href="{$r[url]}" title="{$r[title]}" target="_blank"{title_style($r[style])}>{str_cut($r[title], 42,'')}</a></h1>
                                                        {/loop}
 {/pc}

单个推荐位代码:

{pc:get sql="SELECT * FROM v9_news WHERE id IN (SELECT id FROM v9_position_data WHERE posid=‘2’ and catid in(19,20,21,22,23,24,25,26,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43)) order by id DESC" num="1" return="data"}
                                                        {loop $data $n $r}                                                       
                                                    <h1><a href="{$r[url]}" title="{$r[title]}" target="_blank"{title_style($r[style])}>{str_cut($r[title], 42,'')}</a></h1>
                                                        {/loop}
{/pc}

评论:(0)复制地址
发布:苗景云 | 分类:IT技术&设计 | Tags:PHPCMS

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。