【发布时间】:2018-09-01 05:52:08
【问题描述】:
使用 Laravel 框架。看起来 Where-In sql 查询与框架发生冲突。我错了,如果没有任何解决方法?
//terms is the search string sent to server.
//Am breaking it up into searchable tags.
$terms = explode(" ", $term);
$posts = DB::select('SELECT * FROM car
WHERE model IN ?',
implode(',',$terms));
错误:
prepareBindings() must be of the type array, string given
【问题讨论】: