469,088 Members | 1,273 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,088 developers. It's quick & easy.

Problem: Displaying MySQL TEXT datatype in C program

Hi,

I'm currently trying to display the contents of a field which datatype
is set to TEXT, I'm trying to output this through a C program.

the line is as follows:

while((row = mysql_fetch_row(result)) != NULL)
{
printf("SID: %d\t\tSensor: %s",(row[1] ? row[1] : "NULL"));
}
I have trued %c and %s in to print the Sensor name, however %s
crashes the program and %c produces a smiley face.

Can anyone pls advise?

Thanks
Thomas
Jul 20 '05 #1
0 1041

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Lekeas GK | last post: by
3 posts views Thread by os2 | last post: by
3 posts views Thread by Newbie | last post: by
reply views Thread by Chris Ericoli | last post: by
4 posts views Thread by Vigneshwar Pilli via DotNetMonster.com | last post: by
2 posts views Thread by donpro | last post: by
3 posts views Thread by cnplnsk | last post: by
3 posts views Thread by mikec87 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.