thanks for the tip barney, i had no idea :)

good stuff.
tw

On 6/6/05, Barney Boisvert <[EMAIL PROTECTED]> wrote:
> <cffunction name="mysql_insert_id()">
>   <cfset var get = "" />
>   <cfquery datasource="#variables.my.dsn#" name="get">
>     SELECT LAST_INSERT_ID() AS id
>   </cfquery>
>   <cfreturn get.id />
> </cffunction>
> 
> You'll want to call this function from within a transaction with your
> other queries to ensure it gives you the right result.  PHP doesn't
> have this requirement, because in PHP you manage your own connections,
> but in CF they are managed in a pool by CF itself.
> 
> cheers,
> barneyb
> 
> On 6/6/05, Bob Flynn <[EMAIL PROTECTED]> wrote:
> > This function returns the last inserted ID in MySQL. I have read the 
> > threads about getting it from MS SQL, but that is done in the SQL. Is there 
> > a way to do it for MySQL with CFML?
> >
> > Thanks,
> >
> > Bob
> >
> --
> Barney Boisvert
> [EMAIL PROTECTED]
> 360.319.6145
> http://www.barneyb.com/
> 
> Got Gmail? I have 50 invites.
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:208746
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

Reply via email to