php - codeigniter where_not_in not working
Get the solution ↓↓↓Solution:
your$data
array must be in this format
array(2, 3, 7, 8, 9)
but your array is
array (size=5)
0 => object(stdClass)[26] public 'employee_id' => string '2' (length=1)
1 => object(stdClass)[27] public 'employee_id' => string '3' (length=1)
2 => object(stdClass)[28] public 'employee_id' => string '7' (length=1)
3 => object(stdClass)[29] public 'employee_id' => string '8' (length=1)
4 => object(stdClass)[30] public 'employee_id' => string '9' (length=1)
so restructure your array inside your controller
$newData = array();
foreach($data as $row) {
$newData[] = $row->employee_id;
}
$data = $newData;
so this will become
array(2, 3, 7, 8, 9)
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: object not found by the @paramconverter annotation.
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.