From: Michael Widenius Date: May 22 1999 8:45am Subject: Working with bigints List-Archive: http://lists.mysql.com/mysql/3745 Message-Id: <199905220845.KAA00970@tik.pp.sci.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit >>>>> "Shane" == Shane Wegner 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); Regards, Monty