No need to write query in Joomla for database Updation,We can Simply update the object by the Help of JFactory object Make the object and set the attributes which you want to update in the database(Object Like this :: $object->v_id=$session_id;$object->status="Online";) call the updateObject method and pass the arguments as follows 1)Table Name 2)Object (with set attributes which you want to update) 3)Primary key of the table 4)false/true (Give false if you do not want to update Nulls and pass true in the argument if you want to update Null also) Sample Code $db=&JFactory::getDBO(); $db->updateObject( "#__TableName", $object, "primary_key","false");
|
My Blog Title
|