All the numeric types are returned as strings. If you want to convert them to numbers, you need to use scanf or atod type functions.
Michael Flora wrote: > Hello all, this is my first post to this list. I am relatively new to > MySQL, and my question might be a basic one. > > I have a table that contains both character and binary data. I am > reading rows from the table using the function mysql_fetch rows() in a > C program. I can obtain character data all right, but I cannot obtain > the values of binary data stored in the table as type DOUBLE. My code > looks like this: > > double dnum; > . > . > . > row = mysql_fetch_rows(result); > > dnum = *row[1]; /* The data is stored in the 2nd column of the > table */ > > printf("%10.2f",dnum); > > When I execute this I get junk. I know from inspection that there are > good values in the table. What am I doing wrong? > > Thanks for any advice, > Michael Flora > > > > --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php