Mike, I will look into that. I thought as long as I wrapped the insert user query and the select user query (with the max() function) in a cftransaction tag that I would eliminate race conditions and therefore would return the correct userID. Is that incorrect?
About getting the userID to the newsletter component, I am thinking maybe I should invoke the insertUser method from within my insertSubscriber method, but I don't know how that would work because I am not that advanced at CFC's. Thanks, Aaron On 2/10/06, Mike Soultanian <[EMAIL PROTECTED]> wrote: > remember, max may not give you what you want, especially if another user > inserts a record just in between the time when you insert your record > and then poll for the max id. > > I'm not sure if mysql supports nextval (like oracle), but you might want > to do something like this instead: > > http://jamesthornton.com/software/coldfusion/nextval.html > > enjoy, > Mike > > Aaron Roberson wrote: > > Thanks for the link! > > > > Actually, I do know how to get the unique ID with the MAX() function in SQL. > > > > I guess my real question is how do I pass the unique ID from one > > method in the users component into another method in the newsletter > > component? Can anyone help with that? > > > > -Aaron > > > > On 2/10/06, C. Hatton Humphrey <[EMAIL PROTECTED]> wrote: > >>> I am running MySQL 4.0.25 remotely on my production server and 4.1.12 > >>> on my local box. > >> I can't help you with the CFC's but you mihgt look into this page for some > >> help > >> http://dev.mysql.com/doc/refman/5.0/en/getting-unique-id.html > >> Hatton > >> > >> > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231970 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

