PEAR DB_common::nextId() reserve next id?

Timetravellers

New Member
I noticed during testing the the database will jump a number in the index if someone else inserts a record while I've issued the nextId(). Does issuing this command reserve the next id?Example:User 1:\[code\]$nextId = $db->nextId('id');echo "Next id: ".$nextId."<br />";\[/code\]results: 1234, but no insert happen as I'm just getting the nextId()User 2: (Just right after user 1)\[code\]$rs = $db->query(INSERT NEW RECORD HERE...);\[/code\]id = 1235, Inserted new recordNow I go to query the DB manually and I see record id 1233 and 1235, but the 1234 that I did the nextId() for is missing in the DB. Is this the expected results?
 
Back
Top