Re: LAST_INSERT_ID returning 3 rows?

2001-05-04 Thread Alexander Skwar
So sprach Graeme B. Davis am Tue, May 01, 2001 at 01:09:15PM -0400: 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

Re: LAST_INSERT_ID returning 3 rows?

2001-05-02 Thread alec . cawley
COk 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? As I understand it, LAST_INSERT_ID is connection based, not

Re: LAST_INSERT_ID returning 3 rows?

2001-05-01 Thread Graeme B. Davis
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

Re: LAST_INSERT_ID returning 3 rows?

2001-05-01 Thread Graeme B. Davis
: 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

RE: LAST_INSERT_ID returning 3 rows?

2001-04-30 Thread Braxton Robbason
last_insert_id is a function. It will return a value for each row in the table. You want to run: select last_insert_id() as lid; instead of selecting from a table. -Original Message- From: Graeme B. Davis [mailto:[EMAIL PROTECTED]] Sent: Monday, April 30, 2001 3:17 PM To: [EMAIL

Re: LAST_INSERT_ID returning 3 rows?

2001-04-30 Thread Gerald Clark
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 |