我需要获取级别从一个值到另一个值的用户。好吧,我不知道如何进行正确的查询。这是我的错误尝试:
$thread = Threads::findOrFail($id);
$users= Users::where(
['rank', '>', $thread->rank_from],
['rank', '<', $thread->rank_to]
)->get();
Run Code Online (Sandbox Code Playgroud)
我的错误是:
未找到列:1054 'where 子句' 中的未知列 '0'(SQL:select * from accounts where (0 = rank and 1 = > and 2 = 21))
谢谢!