List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:May 22 1999 8:45am
Subject:Working with bigints
View as plain text  
>>>>> "Shane" == Shane Wegner <shane@stripped> writes:

Shane> Hi,
Shane> I have a database which is using several signed bigint datatypes but I am
Shane> having trouble getting them into a variable.  the mysqlclient fetchrow
Shane> function returns them as chars.  For a normal long I could use strtol(3)
Shane> but strtol seems to trunkate long longs.  Has anyone written anything to
Shane> convert a bigint type (char *) into a longlong?

The mysql client library should include the function 
strtoll();  Some operation systems also has this function natively.

The prototypes are:

longlong strtoll(const char *str, char **ptr, int base);
longlong strtoull(const char *str, char **ptr, int base);

Working with bigintsShane Wegner17 May
  • RE: Working with bigintsDon Read17 May
  • Working with bigintsMichael Widenius22 May
  • Working with bigintsMichael Widenius22 May