I am trying to write new records to jos_simplelists (id, title, link_type, link) and to jos_simplelists_categories (id, category_id)
I have "enable data storage" pointing to jos_simplelists - so the autogenerated code writes the record to jos_simplelists
Looking through the forum it seems I have to write the jos_simplelists_categories record in "On submit code after sending email" and change the order of processing to after autogenerated.
I have this
But how do I get the ID of the jos_simplelists record just written?
Thanks
jb
I have "enable data storage" pointing to jos_simplelists - so the autogenerated code writes the record to jos_simplelists
Looking through the forum it seems I have to write the jos_simplelists_categories record in "On submit code after sending email" and change the order of processing to after autogenerated.
I have this
<?php
$db =& JFactory::getDBO();
$catid = JRequest::getInt('select_0', '', 'post');
$id = /* ???????? */ ;
$query = "INSERT INTO `jos_simplelists_categories` (id, category_id) VALUES ($id, $catid)";
$db->setQuery($query);
$db->query();
?>
But how do I get the ID of the jos_simplelists record just written?
Thanks
jb