How to insert an entry into table # __k2_items:
$db = &JFactory::getDBO(); $query = "INSERT INTO jos_k2_items (`title`, `alias`, `catid`, `published`, `introtext`, `fulltext`, `video`, `gallery`, `extra_fields`, `extra_fields_search`, `created`, `created_by`, `created_by_alias`, `checked_out`, `checked_out_time`, `modified`, `modified_by`, `publish_up`, `publish_down`, `trash`, `access`, `ordering`, `featured`, `featured_ordering`, `image_caption`, `image_credits`, `video_caption`, `video_credits`, `hits`, `params`, `metadesc`, `metadata`, `metakey`, `plugins`) VALUES ('".$title."', '".$title."', ".$catid.", 0, '<p>".$introtext."</p>', '', NULL, NULL, '".$extra_fields."', 'extra_fields_search', now(), 62, '', 0, '0000-00-00 00:00:00', '', 62, '', '0000-00-00 00:00:00', 0, 0, 5, 0, 0, '', '', '', '', 0, '', '', 'robots=\nauthor=', '', '') "; $db->setQuery($query); $db->query();