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();



上一篇:yaf 路由协议配置
下一篇:thinkphp 模板 volist 循环输出(一维)数组对应的键值

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