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

  

posted @ 2018-05-08 13:05  不拨牙  阅读(1378)  评论(0编辑  收藏  举报