added field to sessions table - won't update

added field to sessions table - won't update

by Rob Galpin -
Number of replies: 1

I added a field to the sessions table. I am trying to update the field programmatically and it will not update.

//update session.timeresentnotify (new field i added to sessions table)
$session->timeresentnotify = 123123;

$success =  $DB->update_record('facetoface_sessions', $session);

update_record() returns true. But the new field i added does not update.

Any thoughts on why?

thanks!

Average of ratings: -
In reply to Rob Galpin

Re: added field to sessions table - won't update

by Rob Galpin -

ok - got it to work using:

$timenow = time();
$where = "id = ?";
$whereparams = array($session->id);

$DB->set_field_select('facetoface_sessions', 'timeresentnotify', $timenow, $where, $whereparams);