我得到1054-在MySQL的where子句中使用反引号时出现未知列错误
`roles`.`id`
但它可以正常工作
'roles.id'
知道为什么以及如何解决吗?我需要使其与反引号一起使用,以利用Laravel Eloquent查询构建器。
select *
from `users` inner join `role_user` on `users`.`id` = `role_user`.`user_id`
where `roles`.`id` = `role_user`.`role_id` and (`users`.`id` = 8) and `users`.`id` = 8