Currently I have this variable
$arrays = implode(", ", $request->pmChck);
and If I try to return this variable. I will be getting this kind of output
2019-100,2018-100
As you can see the values are separated by commas
Now in my laravel query, I'm trying to get all the records of the employee except for these two company_id
above.
$pm_selected = DB::connection('mysql')->select("SELECT * FROM view_employee_info WHERE company_id NOT IN('".$arrays."')");
The query is not working, it shows all the data and also the data with the company_id
of 2019-100 and 2018-100
It should listing all the data except for these two company_id
2019-100 and 2018-100
Is there anything wrong with my format or syntax?