Ok, but I havn't gotten anywhere really... :-/
------------------------------------------------------------------
if(!empty($_POST['first']) && !empty($_POST['second']) &&
intval($_POST['first']) !== intval($_POST['second'])){
$first = $_POST['first'];
$second = $_POST['second'];
$ord = ($second <= $first) ? 'DESC' : '';
$r = mysql_query("SELECT * FROM MCI WHERE Id = $first OR Id = $second
ORDER BY Id $ord");
if(mysql_num_rows($r) == 2){
while($d = mysql_fetch_array($r)){
$arr[] = $d;
}
$output = createHTML($arr);
}else{
$output = "The values must be different and exist in the list. " .
$output;
}
}
$first = $arr[0];
$second = $arr[1];
$firstdata = json_encode($arr[0]);
$seconddata = json_encode($arr[1]);
------------------------------------------------------------------
My print json looks like
this
{"0":"7","Id":"7","1":"test","Foretag":"test","2":"44","Variabel_namn_4":"44","3":"34","Variabel_namn_5":"34","4":"64","Variabel_namn_6":"64"}
So I have to format it the right way but I can't figure out how...
If I want to show a simple bar chart with these
columns "Variabel_namn_5":"34","Variabel_namn_6":"64" How should I proceed?
Many thanks for taking time helping me out! :)
Cheers
Adam
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-visualization-api/-/atXAy-CU7aIJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.