9 years ago
9
Topic

Hello,

Could you explain me why the following code works correctly 'before render' but not before or after storage. (There's no message error but the field of table '#__cession' is not updated )

Thanks

//update de la table cession
$id_cession = 5;
$nb_heures = 99;
$object = new stdClass();
$objectInsc ->id = $id_cession;
$objectInsc ->nb_heures_reserve = $nb_heures;
$db = JFactory::getDbo();
try{ $result = $db->updateObject('#__cession', $objectInsc , 'id'); }
catch (JException $e){ $this->setError($e->getMessage() );
return false;}
Get a Book for SEBLOD

9 replies have been added to this thread, and the topic is marked as solved.
You should subscribe to a club in order to read all posts.