I think this could be a larger problem. If I back track into the /vendor/laravel/framework/src/Illuminate/Database/Connection.php when it hits the run command the query and the bindings appear to be ok.
So then it gets into $callback is where the issue must be coming from.
If I print out the last query using the \DB::getQueryLog() function. I return this:
array (size=3)
'query' => string 'select * from `tracks` where `title` LIKE ? or `artist` LIKE ? and `id` not in (?, ?, ?, ?, ?) limit 10' (length=103)
'bindings' =>
array (size=7)
0 => string '%Daft Punk%' (length=11)
1 => string '%Daft Punk%' (length=11)
2 => int 338
3 => int 377
4 => int 3343
5 => int 1185
6 => int 1532
'time' => float 27.33
But in my laravel.log file it shows something different:
select * from `tracks` where `title` LIKE '%Daft Punk%' or `artist` LIKE '%Daft Punk%' and `id` not in ('%Daft Punk%', '%Daft Punk%', '%Daft Punk%', '%Daft Punk%', '%Daft Punk%') limit 10
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community