tp3 聯表查詢



聯表查詢
D("column") ->field("{$DbPrefix}column.pid,{$DbPrefix}news.*") ->where(array("{$DbPrefix}news.style"=>"woman")) ->order("id desc") ->limit(20) ->join("__NEWS__ on __NEWS__.pid = __NEWS__.pid") ->select();



in查詢

$where['pid'] = array('in',array_column($arrID,'id'));
$result = D('news')->where($where)->limit(3)->select();

  


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM