Laravel 雄辩的倍数,其中具有较高和较低的相同值
我无法获得以下雄辩查询的结果:Laravel 雄辩的倍数,其中具有较高和较低的相同值,laravel,laravel-5,eloquent,Laravel,Laravel 5,Eloquent,我无法获得以下雄辩查询的结果: return Cost::where('zipcode_start', '>=', 8000) ->where('zipcode_end', '<=', 8000) ->pluck('price); 返回 成本::其中('zipcode_start','>=',8000) ->我认为你的比较应该改变立场 Cost::where([ ['zipcode_start, '<=', 8000], ['zipc
return
Cost::where('zipcode_start', '>=', 8000)
->where('zipcode_end', '<=', 8000)
->pluck('price);
返回
成本::其中('zipcode_start','>=',8000)
->我认为你的比较应该改变立场
Cost::where([
['zipcode_start, '<=', 8000],
['zipcode_end', '>=', 8000]
])
->pluck('price');
Cost::where([
['zipcode_start',=',8000]
])
->拔毛(价格);
你找不到任何数据,因为你做错了。你能用一个例子说更多吗我认为比较是错误的。如果你使用whereRaw,它能工作吗?查询没有问题。你能验证它是否真的有该条件的数据吗?什么类型的列是zipcode\u start
?不会改变A=8000的任何内容我的答案是,如果我的答案没有明确指出,请帮助改进。好吧,我打赌,但这仍然没有意义……或者他的表列有点乱;)@Paolo_Mulder这是有意义的;-)这就是解决办法