/ Published in: PHP

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
//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; }
Comments
