• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.