[ROOT] MySQL and string troubles

From: Dejan Nikic (dejann@u.washington.edu)
Date: Sun Nov 02 2003 - 09:26:07 MET


Hi,

I posted this on forum board, but in case some of you don't read it I
wanted to post it here too:


I've run into a weird problem. What I'm trying to do is gather bunch of
data from MySQL and then plot it. I've got all the values from MySQL and
if i do: 

print("%s", x[i]); 

inside a loop I get all the correct values. But if I do: 

print("%d", x[i]); or print("%f", x[i]); or print("%i", x[i]); I get
some ridiculous 10^5 numbers. From here I assume that the root gets data
from MySQL as strings, not as doubles or whatever the data might be
inside MySQL. Now what I would like to do is get the graphing libs from
root to be able to graph these correct values. 

it seems that TGraph() only works with doubles and integers and since I
can't get this stuff from MySQL into the that form, could you tell me
how I could do it? 

Thank you.



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:16 MET