From: Michael Widenius Date: April 10 1999 12:05pm Subject: mysql_insert_id always returns 0 !! List-Archive: http://lists.mysql.com/mysql/1631 Message-Id: <14095.15938.931381.441274@monty.pp.sci.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit >>>>> "rolf" == rolf toft writes: rolf> I downloaded and installed a new binary release of mysql for my LINUX rolf> station and since then both mysql_insert_id(&mysql) and rolf> mysql_num_fields(res) in rolf> my code always returns 0 !!! rolf> These are sections of code which worked before with older releases of rolf> MySql rolf> I'm using the C API to interface to the database. The release I rolf> installed is 3.22.21. rolf> I did define the NO_CLIENT_LONG_LONG variable in order to link to the rolf> new mysql.h library and I did change my code to take a unsigned long as rolf> a return rolf> parameter for these functions ... Still the return value is always 0 ? rolf> I have seen threads on the mailing list regarding this issue - but not rolf> found any help - can anybody please point to what is going on ? rolf> Rolf. Hi! The only reason I can quickly think of that would explain the above is that you are using and old mysql client include files when compiling your application. Can you create a very short test program that shows this? Regards, Monty