> That way you'll have them both at the same time, and wont have to worry
> about anyone inserting anything else at the same time.

but the same with lock, surely? type=exclusive means other requests are
queued until the action within the lock completes, no?

or at least that's what I thought...

Ian W

----- Original Message -----
From: "Tom Smith" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 28, 2003 2:19 PM
Subject: Re: [ cf-dev ] a quickie...


> <cftransaction>
> insert statement here
>
> <cfquery name="max" datasource="blah">
>     select max(id) as maxid from table
> </cfquery>
> </cftransaction>
>
> That way you'll have them both at the same time, and wont have to worry
> about anyone inserting anything else at the same time.
>
> Cheers.
> ----- Original Message -----
> From: "Oliver Tomkins" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, May 28, 2003 2:05 PM
> Subject: RE: [ cf-dev ] a quickie...
>
>
> Be weary though if there is another record being inserted at the same time
> you might run into trouble.
>
> So how about
>
>   <cfquery datasource="#dsn#" name="thistown">
>   SELECT MAX(id) AS MaxID from towns
>   WHERE column = 'something I've just inserted'
>   </cfquery>
>
>
>
> -----Original Message-----
> From: Ian Westbrook [mailto:[EMAIL PROTECTED]
> Sent: 28 May 2003 13:55
> To: [EMAIL PROTECTED]
> Subject: Re: [ cf-dev ] a quickie...
>
>
> boootiful. ta ;-)
>
> Ian
>
> ----- Original Message -----
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, May 28, 2003 1:52 PM
> Subject: Re: [ cf-dev ] a quickie...
>
>
> >
> >  <cfquery datasource="#dsn#" name="thistown">
> >  SELECT MAX(id) AS MaxID from towns
> >  </cfquery>
> >
> >
> > Duncan Cumming
> > IT Manager
> >
> > http://www.alienationdesign.co.uk
> > mailto:[EMAIL PROTECTED]
> > Tel: 0141 575 9700
> > Fax: 0141 575 9600
> >
> > Creative solutions in a technical world
> >
> > ----------------------------------------------------------------------
> > Get your domain names online from:
> > http://www.alienationdomains.co.uk
> > Reseller options available!
> > ----------------------------------------------------------------------
> > ----------------------------------------------------------------------
> >
> >
> >
> >                     "Ian
> >                     Westbrook"           To:     "cfug dev list"
> <[EMAIL PROTECTED]>
> >                     <[EMAIL PROTECTED]        cc:
> >                     eam.net>             Subject:     [ cf-dev ] a
> quickie...
> >
> >                     28/05/2003
> >                     13:45
> >                     Please
> >                     respond to
>
> >                     dev
> >
> >
> >
> >
> >
> > sorry, another quickie
> >
> > I want to get the id of the record I just added (CF4.5). I'm using this
> >
> >  <CFLOCK
> >  TIMEOUT="30"
> >  TYPE="Exclusive">
> >
> >  <cfquery datasource="#dsn#">
> >  INSERT INTO towns (town) VALUES ('#form.town#')
> >  </cfquery>
> >
> >  <cfquery datasource="#dsn#" name="thistown">
> >  SELECT id from towns
> >  </cfquery>
> >
> >  </CFLOCK>
> >
> > do I want ASC/DESC LIMIT 1 in the 'thistown' query, or maxrows="1" on
the
> > output?
> >
> > TIA
> >
> > Ian W
> >
> >
> >
> > Ian Westbrook,
> > FutureDream Media Limited,
> > (W): www.futuredream.net
> > (E): [EMAIL PROTECTED]
> > (T): +44 (0) 1303 258 985
> > (M): 07939 510 812
> >
> > This message may contain information which is legally privileged and/or
> > confidential. If you are not the intended recipient, you are hereby
> > notified that any unauthorised disclosure, copying, distribution or use
of
> > this information is strictly prohibited. Such notification
notwithstanding
> > any comments, opinions, information or conclusions expressed in this
> > message are those of the originator, not of FutureDream Media Ltd,
unless
> > otherwise explicitly and independently indicated by an authorised
> > representative of FutureDream Media Ltd.
> >
> >
> >
> >
> >
> > --
> > ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
> >
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > For human help, e-mail: [EMAIL PROTECTED]
> >
>
>
> --
> ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
>
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> For human help, e-mail: [EMAIL PROTECTED]
>
>
> --
> ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
>
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> For human help, e-mail: [EMAIL PROTECTED]
>
>
> --
> ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
>
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> For human help, e-mail: [EMAIL PROTECTED]
>


-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to