List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:April 10 1999 12:05pm
Subject:mysql_insert_id always returns 0 !!
View as plain text  
>>>>> "rolf" == rolf toft <rolftoft@stripped> 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.


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?

mysql_insert_id always returns 0 !!rolf toft7 Apr
  • mysql_insert_id always returns 0 !!Michael Widenius10 Apr