I created an extension for joomla using:
$id=$database->insertid();
I just covered that if two users are logged on to the site will fit together perform two records in the database and then this statement will return in both cases the same value. in php you can solve this problem with the transactions.
In joomla how do I solve this problem?