List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:March 28 2002 5:15am
Subject:Re: C API question
View as plain text  
At 5:09 +0000 3/28/02, Federico Halperin wrote:
>In a table, I declared a column which is an integer unsigned.
>After calling mysql_fetch_row, I need to convert the value of the 
>column (i.e. row[0]) to a string.

According to the manual, *all* column values are returned as strings.
I'd say you don't need to convert it.

>I tried to solve it doing this:
>char var[11];
>sprintf (var, "%u", row[0]);
>, but it doesn't work.
>Is *row[0] an unsigned int?
>Can anybody help me???

It's a good idea to take a good look at the descriptions of these
functions (and the data types they use) in the manual to see
how they work.  No point in guessing.

C API questionFederico Halperin28 Mar
  • Re: C API questionPaul DuBois28 Mar
RE: C API questionChetan Lavti28 Mar
RE: C API questionChetan Lavti28 Mar