Dave Watts wrote: >> >>That's only reliable inside a transaction. Don't leave that >>part out. > > > Actually, depending on your database, a transaction may not be required just > as Barney states. For example, if you're using MS Access, the entire table > is locked when you write to it, so a transaction wouldn't be required.
Yes, but wouldn't there be a possibility that someone could sneak in and do an insert between the time that you do the insert and then select for the last auto_increment? Ugh, my head hurts! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192461 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54