Ok now I understand -- it's on a per-connection basis =)

thanks,

graeme
----- Original Message -----
From: "Graeme B. Davis" <[EMAIL PROTECTED]>
To: "Gerald Clark" <[EMAIL PROTECTED]>; "Braxton Robbason"
<[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, May 01, 2001 1:09 PM
Subject: Re: LAST_INSERT_ID returning 3 rows?


> Ok I was thinking that you had to tell LAST_INSERT_ID the table you wanted
> to get the last insert id from.  What if you run a web site and you have
10
> tables in a database, how can you tell what the last insert id of table 6
> was?
>
> Thanks,
>
> Graeme
>
> > Because you included a from clause, you got one line for each row
> > of 'outages'
> >
> > Leave out the "from outages"
> >
> > Graeme B. Davis wrote:
> >
> > > mysql> INSERT INTO outages (status) VALUES ('Open');
> > > mysql> SELECT LAST_INSERT_ID() AS lid FROM outages;
> > > +-----+
> > > | lid |
> > > +-----+
> > > | 101 |
> > > | 101 |
> > > | 101 |
> > > +-----+
> > > 3 rows in set (0.00 sec)
> > >
> > > Why would MYSQL do this?  Any ideas?
> > >
> > > Thanks,
> > >
> > > Graeme
> > >
> > > p.s. DESCRIBE outages;
>
>


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to