List:General Discussion« Previous MessageNext Message »
From:Matthias Pigulla Date:June 1 1999 10:45am
Subject:mysql_insert_id()
View as plain text  
Hi folks,

I'm currently facing a little problem with the C API's mysql_insert_id()
function. I'll have to check it a bit more thoroughly, but right now it
seems to me as if 

- it would return the correct auto_incremented value after an INSERT,
- but after performing a second INSERT into another table with the use
of LAST_INSERT_ID() funcion   in the query itself, it returns 0,
although no new auto_incrementing table hat been touched.

Am I doing sth wrong, is this the intended behaviour? The manual says
"returns the id that was most recently generated", so I expected the
value to remain visible.

BTW, I am using a 3.22.22 client with a 3.22.16gamma (remote) server. If
you find it necessary (and it's not a problem on my side), I'll post
some code to check this out.

Matthias
-- 
   w e b f a c t o r y | matthias pigulla
      www.webfactory.de  mp@stripped
Thread
mysql_insert_id()Matthias Pigulla1 Jun
  • Re: mysql_insert_id()Paul DuBois1 Jun
    • Re: mysql_insert_id()Matthias Pigulla3 Jun
      • Re: mysql_insert_id()Paul DuBois3 Jun
    • Re: mysql_insert_id()Jim Faucette3 Jun
    • Re: mysql_insert_id()Matthias Pigulla3 Jun
      • Re: mysql_insert_id()Benjamin Pflugmann3 Jun
        • Re: mysql_insert_id()Michael Widenius3 Jun
          • Re: mysql_insert_id()Paul DuBois3 Jun
    • Re: mysql_insert_id()Matthias Pigulla3 Jun
    • Re: mysql_insert_id()Matthias Pigulla3 Jun
      • Re: mysql_insert_id()Michael Widenius3 Jun