使用Laravel框架。它看起来像是Where查询与框架冲突。我错了吗,如果没有工作的话?
//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发布于 2018-03-22 17:22:14
你能试试$posts = DB::select('SELECT * FROM car WHERE model IN (?)', [implode(',',$terms)]);并向后报告吗?
我更新了答案,以反映什么对你有用。
https://stackoverflow.com/questions/49434651
复制相似问题