Quick question, I don't see why this isn't working. I'm using the v1.0 stable build via codeigniter sparks.
If I do a find_by method to find a user session then update the single record to active = 0, it updates all the records even if I only selected one row.
For example:
If I have 2 rows
id = 1, userid = 1, key = randstring, active = 1
id = 2, userid = 1, key = randstring, active = 1
Subject: Updating a single record not working
Hello all!
Quick question, I don't see why this isn't working. I'm using the v1.0 stable build via codeigniter sparks.
If I do a find_by method to find a user session then update the single record to active = 0, it updates all the records even if I only selected one row.
For example:
If I have 2 rows
id = 1, userid = 1, key = randstring, active = 1
id = 2, userid = 1, key = randstring, active = 1
then I perform the following
$session = User_session::find_by_id(1);
$session->active = 0;
$session->save();
then I will have the following:
id = 1, userid = 1, key = randstring, active = 0
id = 2, userid = 1, key = randstring, active = 0
any ideas as to why? I expect only id 1 to be updated