phpcms调用discuz缩略图和时间,SQL怎么写呢?

来自:互联网
时间:2018-08-26
阅读:

phpcms调用discuz缩略图和时间,SQL怎么写呢?

{pc:get sql="SELECT pre_forum_threadimage.tid,pre_forum_threadimage.attachment,pre_forum_thread.subject FROM pre_forum_threadimage LEFT JOIN pre_forum_thread ON pre_forum_thread.tid = pre_forum_threadimage.tid order by tid desc" num="20" dbsource="DZ数据库名称" return="data"}
   {loop $data $key $val}<li>
     <a title="{$val[subject]}" href="http://www.freexyz.cn/thread-{$val[tid]}-1-1.html" target="_blank" class="transform-img img-wrapper"><img width="180" height="135" class="transform-img" src="http://www.freexyz.cn/attachment/{$val[attachment]}" alt="{$val[subject]}"></a>
     <p class="img-wrappertxt cWhite"><a title="{$val[subject]}" href="http://www.freexyz.cn/thread-{$val[tid]}-1-1.html" target="_blank">{$val[subject]}</a></p>
    </li>{/loop}
  {/pc}

以上代码未经实测,大家不要在实际生产环境部署!

返回顶部
顶部