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;
>
> +---------------+------------------+------+-----+---------+----------------+
> | Field | Type | Null | Key | Default | Extra |
> +---------------+------------------+------+-----+---------+----------------+
> | id | int(10) unsigned | | PRI | NULL | auto_increment |
> | router | varchar(25) | YES | | NULL | |
> | techticket | varchar(15) | YES | | NULL | |
> | rfoticket | varchar(15) | YES | | NULL | |
> | nocticket | varchar(15) | YES | | NULL | |
> | sitesaffected | int(6) | YES | | NULL | |
> | telconame | varchar(100) | YES | | NULL | |
> | telcoticket | varchar(100) | YES | | NULL | |
> | start | datetime | YES | | NULL | |
> | stop | datetime | YES | | NULL | |
> | updated | timestamp(14) | YES | | NULL | |
> | slasent | datetime | YES | | NULL | |
> | sla | varchar(10) | YES | | NULL | |
> | vmstart | datetime | YES | | NULL | |
> | vmstop | datetime | YES | | NULL | |
> | rfo | varchar(200) | YES | | NULL | |
> | status | varchar(15) | | | Open | |
> | interface | varchar(255) | YES | | NULL | |
> | comments | text | YES | | NULL | |
> +---------------+------------------+------+-----+---------+----------------+
>
>
> ---------------------------------------------------------------------
> 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
--
Gerald L. Clark
[EMAIL PROTECTED]
---------------------------------------------------------------------
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