Return to Snippet

Revision: 46208
at May 14, 2011 05:29 by anagaiyahoocom


Initial Code
//Create row object
    $db = JFactory::getDBO();
    $row = new JObject();
    $row->id = (int)$user->id;
    $row->title = 'My Favorites';
    $row->alias = JFilterOutput::stringUrlSafe($row->title); //format in slashed alias format
    $row->default = 1;
     
    //third parameter is key field
    $ret = $db->updateObject('#__jxgallery_lightboxes', $row, 'id');
     
    if (!$ret) {
    $this->setError($db->getErrorMsg());
    return false;
    }

Initial URL

                                

Initial Description

                                

Initial Title
Updating Table Using JDatabase::updateObject() in Joomla

Initial Tags
joomla

Initial Language
PHP