Thanks Jochem
but autonumber is secure???
Using Win2K/CFMX 6.1/MySQL 4.0.1 InnoDB Transaction Table we're protected using autonumber fields????
Inside CFTRANSACTION or only MySQL transaction do the job????
----- Original Message -----
From: Jochem van Dieten <[EMAIL PROTECTED]>
Date: Tue, 06 Jan 2004 19:35:57 +0100
To: CF-Talk <[EMAIL PROTECTED]>
Subject: Re: CF_MAX_ID - MySQL slowww
Spectrum WebDesign wrote:
>
> <cfquery name="getmaxID" datasource="#attributes.datasource#">
> select max(#attributes.PrimaryKEY#) as Max_ID
> from #attributes.tablename#
> </cfquery>
Use the proper indexes.
> Why the hell would you want to do this?
>
> Because autonumber datatypes are not easily transferable from database to database. They are also
> a pain in the neck to develop with, because once the record has been created that number can never
> be used again.
That depends on your database.
> This technique is not 100% necessary for Fusebox applications, but after
> you play with autonumbers and try and move data from one database to another you'll thank me.
And after a concurrency conflict he will be cursed. Please take a
moment to think about the default transaction isolation level in
MySQL and the implications that has for your code. It is
currently not concurrency save.
> Do you have another option to Max_ID????
Bite the bullet and let the database generate the primary key.
Jochem
--
I don't get it
immigrants don't work
and steal our jobs
- Loesje
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
- Re: CF_MAX_ID - MySQL slowww Jochem van Dieten
- RE: CF_MAX_ID - MySQL slowww Barney Boisvert
- RE: CF_MAX_ID - MySQL slowww Spectrum WebDesign
- RE: CF_MAX_ID - MySQL slowww Barney Boisvert
- Re: CF_MAX_ID - MySQL slowww Jochem van Dieten
- RE: CF_MAX_ID - MySQL slowww Barney Boisvert
- Re: CF_MAX_ID - MySQL slowww Jochem van Dieten
- RE: CF_MAX_ID - MySQL slowww Barney Boisvert
- Re: CF_MAX_ID - MySQL slowww Jochem van Dieten
- RE: CF_MAX_ID - MySQL slowww Matt Robertson
- Re: CF_MAX_ID - MySQL slowww Spectrum WebDesign
- Re: CF_MAX_ID - MySQL slowww Jochem van Dieten
- RE: CF_MAX_ID - MySQL slowww Barney Boisvert
- RE: CF_MAX_ID - MySQL slowww Spectrum WebDesign
- RE: CF_MAX_ID - MySQL slowww Barney Boisvert