How can I bind multiple parameters from different arrays to prevent SQL injection?
$userTypeID = [1,2,3];
$userDeptID = [1,4,6];
$arr = join(",",$arr);
DB::select("select * from users WHERE userTypeID IN (?,?,?) AND userDeptID IN(?,?,?)");
I'm not able to use eloquent because I have a complex query for which I'm using raw queries. So to prevent it from SQL Injection I've to bind the parameters but this isn't working.