Code: Select all
global $mainframe;
JTable::addIncludePath(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_frontpage'.DS.'tables');
$table =& JTable::getInstance('frontpage', 'Table');
$table->ordering = $table->getNextOrder();
$table->content_id = 45;
if (!$table->store()) {
echo $table->getError();
die();
}
What I would like to do is to add a new frontpage item, and not update an existing one. So the SQL should be an INSERT.
Please help!
Stian