1. 程式人生 > >thinkphp3.2使用join聯合查詢

thinkphp3.2使用join聯合查詢

borde -c user left lec 聯合查詢 -h 查詢 creat

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

thinkphp3.2使用join聯合查詢