AFAIK you have to do two queries.

-- Josh



----- Original Message ----- 
From: "Michael E. Carluen" <[EMAIL PROTECTED]>
To: "CF-Talk" <[email protected]>
Sent: Friday, June 02, 2006 1:02 PM
Subject: RE: Fetching last record


> Thanks Josh.  Still a 2-query transaction, huh?... first to insert, second
> to select.(?)
> 'Would be great if mySQL can do these 2 on a single query like MSSQL2k.
>
>
>
> -----Original Message-----
> From: Josh Nathanson [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 02, 2006 12:31 PM
> To: CF-Talk
> Subject: Re: Fetching last record
>
> Yup, LAST_INSERT_ID(), or to be more careful, MAX(LAST_INSERT_ID())
>
> Although someone will probably say why it's not exactly equivalent.
>
>
> --Josh
>
>
>
> ----- Original Message ----- 
> From: "Michael E. Carluen" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[email protected]>
> Sent: Friday, June 02, 2006 12:25 PM
> Subject: RE: Fetching last record
>
>
>> Is there a mySQL equivalent to SCOPE_IDENTITY and @@IDENTITY?  Thanks.
>>
>>
>>
>> -----Original Message-----
>> From: Peter Legg [mailto:[EMAIL PROTECTED]
>> Sent: Friday, June 02, 2006 8:51 AM
>> To: CF-Talk
>> Subject: Re: Fetching last record
>>
>> You should use SCOPE_IDENTITY instead of @@IDENTITY.
>>
>> Peter
>>
>>>That sure worked. Thanks guys.
>>>
>>>- Ken
>>>
>>>On 6/2/06, Charlie Griefer <[EMAIL PROTECTED]> wrote:
>>>>
>>
>>
>>
>>
>
>
>
> 

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

Reply via email to