I too was worried about this, and it appears Barney is correct.

I tested it by creating a test db with two tables:
Table1:
ID - Auto increment int
SomeData - Varchar

Table2:
ID - Auto increment int
ForeignKey - int
SomeData2 - varchar

I then wrote a template that looped 500 times over: INsert into table1(SomeData) 
values(#URL.Data#), Select LAST_INSERT_ID() as NEWID, and Insert into 
Table2(ForeignKey,SOmedata2) Values(NewID,#URL.Data#) (as three separate cfqueries).

Then I opened three browser windows, and called the template with three different data 
values in the URL.

After all pages loaded, I used MySQLcc to join the tables together and found a perfect 
match between Somedata and Somedata2 fields for all 1500 records.  I reran it several 
times, and it never got confused.

Interested in how that was happening, I RTFM'ed and found a function called 
Thread_ID() -- each simultaneous request is assigned a separate thread ID.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com

Reply via email to