phpcms v9 get的强大之处(列表页调用点击数)
{pc:get sql="select * from v9_art as g left join v9_art_data as p on p.id=g.id and g.catid=12 order by p.age desc" } {if $data} {loop $data $r} {php $h_md=pc_base::load_model('hits_model');$get_db=$h_md->get_one(array('hitsid'=>"c-".$modelid."-".$r[id]));$views=$get_db[views];} <li> <a href="{$r[pic_jj]}" rel="lightbox[example]" title="{$r[hj_url]}" rev="画展地址"><img src="{thumb($r[thumb],240,240)}" /></a> <div class="zt_info"> <h3><a href="{$r[url]}">{$r[title]}</a></h3> <div>上传时间:{date('Y-m-d H:i:s',$r[inputtime])}</div> <div>浏览量:{$views}</div> </div> <div class="zt_look"><a href="{$r[url]}">查看</a></div> </li> {/loop} {/if} {/pc}
来源:https://www.cnblogs.com/yuwensong/archive/2013/04/11/3013961.html