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

You're making 2 separate queries, the SELECT isn't being used for the UPDATE query.

I haven't used CI3 in a while, but perhaps you can try something like this.


PHP Code:
$this->db
    
->set($data)
    ->order_by('RAND()')
    ->limit($count)
    ->update('employees'); 
Reply


Messages In This Thread
trying to use batch_update() - by richb201 - 07-28-2020, 04:49 PM
RE: trying to use batch_update() - by ojmichael - 07-28-2020, 08:58 PM
RE: trying to use batch_update() - by qury - 07-29-2020, 01:22 AM
RE: trying to use batch_update() - by richb201 - 07-29-2020, 08:32 AM
RE: trying to use batch_update() - by richb201 - 07-29-2020, 11:16 AM
RE: trying to use batch_update() - by richb201 - 07-29-2020, 02:52 PM
RE: trying to use batch_update() - by richb201 - 07-30-2020, 09:19 AM
RE: trying to use batch_update() - by ojmichael - 07-30-2020, 04:17 PM
RE: trying to use batch_update() - by richb201 - 08-01-2020, 09:02 AM
RE: trying to use batch_update() - by richb201 - 08-02-2020, 05:23 PM
RE: trying to use batch_update() - by ojmichael - 08-03-2020, 05:55 PM
RE: trying to use batch_update() - by richb201 - 08-03-2020, 06:06 PM



Theme © iAndrew 2016 - Forum software by © MyBB