One - One Code All

Blog Content

thinkphp使用join进行联合查询

PHP   2012-11-13 19:36:04
$members=$model->table('zhope_card A')
    ->join('zhope_user U ON A.adduser=U.id',"LEFT")
    ->join('zhope_tpl T ON A.tpl=T.id')
    ->field('A.id AS I,A.cid AS Card_id,U.name AS Creator,T.name AS Tpl_name')
    ->select();



上一篇:linux用md5sum查看文件md5值,diff查看文件区别
下一篇:mysql数据库性能优化

The minute you think of giving up, think of the reason why you held on so long.