我有一个名为vacancies
的表和以下查询。我想让city_id
等于任何值。所以我运行这个查询:
SELECT * FROM vacancies WHERE vacancies.city_id=vacancies.city_id
从phpmyadmin
运行它时效果很好。但是,当我通过laravel
框架代码运行它时,它不起作用:
DB::table('vacancies')->select('*')->where("vacancies.city_id","=","vacancies.city_id")->paginate(5);
我确实需要运行where column=column
之类的查询。
我怎么能在Laravel那样做?或者我的laravel编码出了什么问题?