ugh..that's right...i was hoping i could limit it within a single query field
-----Original Message----- From: Fabio Serra [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 10, 2002 17:11 To: CF-Linux Subject: Re: snagging the recently created PK of a record in MySQL - Help? At 20.26 10/09/2002, you wrote: >[sigh] my apologies for this OT post but I'm in a bit of a bind: > >Using mysql, I used to be able to use INSERT INTO..VALUES..SELECT >PK_FIELD to snag the most recently created primary key. However, today, >after a long time, I find that it no longer works. Any suggestions on >how I can get this value? If I well understood your question: SELECT LAST_INSERT_ID(); But it works only for AUTO_INCREMENT field Bye -------------------------------------------------- FABIO SERRA - faser(at)faser.net PGP available -------------------------------------------------- ______________________________________________________________________ Get the mailserver that powers this list at http://www.coolfusion.com ------------------------------------------------------------------------------ Archives: http://www.mail-archive.com/cf-linux%40houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_linux or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
