What if someone were to insert another city just before the SELECT 
statement executed?

Mike

Baz wrote:
> James, in which cases is it not 100% reliable? Are the CF-Talk archives
> searchable?
> 


>> On 1/9/06, Baz <[EMAIL PROTECTED]> wrote:
>>> Is this the best way to do this:
>>>
>>> <cftransaction>
>>>   <cfquery name="InsertAddress" datasource="#DSN#">
>>>     INSERT INTO Address (City)
>>>     VALUES (<cfqueryparam value="#City#" cfsqltype="cf_sql_integer" />)
>>>   </cfquery>
>>>
>>>   <cfquery name="getInsertedID" datasource="#DSN#">
>>>     SELECT MAX(AddressID) as MaxID
>>>     FROM Address
>>>   </cfquery>
>>> </cftransaction>
>>>
>>> I'm using MySQL.
>> --
>> CFAJAX docs and other useful articles:
>> http://jr-holmes.coldfusionjournal.com/
>>
>>
> 
> 
> 
> 

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