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:231968 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=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54