Welcome Guest, Not a member yet? Register   Sign In
trying to use batch_update()
#11

Here it looks like you wrote a SELECT query, did not utilize the result, and then wrote a separate UPDATE query with no conditions.

I think you're wanting to do something like this..

PHP Code:
$this->db
    
->set(['in_population' => 1])
    ->
where('email'$_SESSION['userid'])
    ->
where('campaign'$_SESSION['campaign'])
    ->
group_start()
        ->where('employee_title',  $exclude_string)
        ->or_where('job_code',  $exclude_string)
        ->or_where('department',  $exclude_string)
        ->or_where('role',  $exclude_string)
    ->
group_end()
    ->
update('employees'); 
Reply
#12

Works great! thank you.
proof that an old dog can learn new tricks
Reply




Theme © iAndrew 2016 - Forum software by © MyBB