$newId = $dbaseConnection->insertid();
// returns the automatic id number generated by the most recent insert query, very handy..