in reply to SQL Troubles
As I replied to you on DevShed, assuming it was you, of course:
mySQL does support locking, so you can reliably retrieve the last ID from it with a normal SQL query.
It might flow like this: prepare your insert statement and get all your data ready, lock tables execute your statement and insert the new data retrieve the last id (which will be from what you just inserted) with +a select query unlock tables do stuff with your id
Just remember to keep your tables locked for as short a time as possible.
-Any sufficiently advanced technology is
indistinguishable from doubletalk.
|
|---|