【发布时间】:2020-02-10 05:14:49
【问题描述】:
我正在尝试使用多个条件连接两个表。由于第二个连接条件,以下查询不起作用。
$all_update = DB::table('posts as p')
->join('cprefs as c','p.qatype', '=', 'c.qatype')
->where('c.wwide', '=', 'p.wwide') //second join condition
->where('c.user_id', $u_id)
->where('p.arank', 1)
->get();
【问题讨论】:
-
您收到的错误信息是什么?