1052 Column 'xxx' in where clause is ambiguous

1052 Column 'xxx' in where clause is ambiguous

 

多表关联查询的时候有where语句中两个相同的列名status,而没有指定是哪个表。

 

->where(function($query) use ($status){
if (isset($status)) {
   $query->where('examples.status', '=', $status);
}
})
posted @ 2021-01-31 10:06  winyh  阅读(452)  评论(0编辑  收藏  举报