<ul>
   {pc:get sql="select * from tdb_special where listorder > 1000 " }{loop $data $r}
   <li><a href="{$r[url]}" title="{$r[title]}" target="_blank"><img src="{$r[thumb]}" alt="{$r[title]}" style="width:165px;height:100px;"/></a></li>
   {/loop}{/pc}
</ul>
上面的调用语句哪里错了,为什么老是空呢

解决方案 »

  1.   

    {loop $data $key $val}
    你似乎少了什么
      

  2.   

    后来我在上面又加了一段这样类似的查询语句就调用出来了,当然上面的得隐藏,我就是不知道是为什么,删了就不能显示,我试过了这个位置不管加查哪个表的都不行,<div class="sub_box_100">
        <div class="title" style="border-top:1px solid #306d44">企业周刊</div>
        <div class="contents" style="margin-bottom:0;">
    <div class="img-scroll">
    <span class="prev"></span>
    <span class="next"></span>
    <div class="img-list">
    <ul>
    {pc:get sql="select * from tdb_zq order by listorders asc "}{loop $data $r}
    <li><a href="{$r[url]}" title="{$r[title]}" target="_blank"></a></li>
    {/loop}{/pc}
    {pc:get sql="select * from tdb_special where listorder > 1000 order by listorder desc" }{loop $data $r}
    <li><a href="{$r[url]}" title="{$r[title]}" target="_blank"><img src="{$r[thumb]}" alt="{$r[title]}" style="width:165px;height:100px;"/></a></li>
    {/loop}{/pc}
    </ul>
    </div>
    </div>
        </div>
    </div>