I'm using a method to store information in another table. This is how I'm doing that:
public static function CreateMail($userid, $title, $state = 1)
{
$maildata['userid'] = $userid;
$maildata['title'] = $title;
$maildata['state'] = $state;
$row = JTable::getInstance('Mail','BestiaTable');
$row->bind($maildata);
$row->check();
$storemessage = $row->store();
return $storemessage;
}
This is working fine - but one problem remains: I would like to get the id of the saved data.
How can I do that?
Edit: The given answer worked on 3.4.48 but on 3.5 $row->id
always returns NULL
.