[thelist] Max(ID) bad, what good?
Joshua OIson
joshua at alphashop.net
Wed Jan 17 23:07:31 CST 2001
You want to pull the maxid in a single transaction with the insert. If you
are using ColdFusion, wrap your two queries in <cftransaction> and it will
make sure the two queries are run back-to-back. A problem arises when
another thread inserts into the table between your insert and the select.
If you are certain you are the only user of the db to insert, then you need
not worry about this problem
good luck,
-joshua
More information about the thelist
mailing list