lucfit
New Member
Hello,
I have a form that collects data that are inserted in a list (A).
Upon submission, the same data are added to another list (B) via the Upsert plugin.
After submission, I would like to read the rowid of the last generated record in the list (B) and update a 'lista___listblastrecordid' field in the list (A).
I've tried using the PHP Plugin (End of form submission) with this code but it doesn't work:
$db =&JFactory::getDBO();
$db->setQuery("SELECT `rowid` FROM `listb` ORDER BY `rowid` DESC LIMIT 1");
$row = $db->LoadRow();
return $row;
$formModel->updateFormData('lista___lastblastrecordid', $row);
Thanks in advance for your help
I have a form that collects data that are inserted in a list (A).
Upon submission, the same data are added to another list (B) via the Upsert plugin.
After submission, I would like to read the rowid of the last generated record in the list (B) and update a 'lista___listblastrecordid' field in the list (A).
I've tried using the PHP Plugin (End of form submission) with this code but it doesn't work:
$db =&JFactory::getDBO();
$db->setQuery("SELECT `rowid` FROM `listb` ORDER BY `rowid` DESC LIMIT 1");
$row = $db->LoadRow();
return $row;
$formModel->updateFormData('lista___lastblastrecordid', $row);
Thanks in advance for your help