when run laravel DB::select with IN statment, as documented:
//$list_of_ids = '1,3,5,66,3'
//$uid = 1
DB::select('
SELECT SUM(score)
FROM user
WHERE id
IN (?)
and user_id = ?
LIMIT 4
', array($list_of_ids,$uid));
not receive any results
but when run:
DB::select('
SELECT SUM(score)
FROM user
WHERE id
IN ('.$list_of_ids.') //add var here
and user_id = ?
LIMIT 4
', array($uid));
return correct results, what is the matter in first way?