Hi Guys
i have the profile module enabled ie profile types and profile value tables
in this i have 10 fields but need to grab only 3 fields that i wish to make into a pie chart have got the chart module but i have no idea how i can output the fields into a pie chart in my own module
i have tried in my function
function get_chart() {
$values = array();
$results = db_query("SELECT users.uid AS uid,
profile_value_total.value AS profile_value_profile_total_value,
profile_value_test.uid AS profile_value_profile_test_uid,
FROM users users
LEFT JOIN {profile_value} profile_value_profile_total ON users.uid = profile_value_profile_total.uid AND profile_value_profile_total.fid = 8
LEFT JOIN {profile_value} profile_value_profile_test ON users.uid = profile_value_profile_test.uid AND profile_value_profile_test.fid = 10
where uid = uid");
$ii = 0;
while ($next_val = db_fetch_object($results)){
$values[$ii] = $next_val->chartvals;
$ii++;
}
$chart = array(
'#plugin' => 'google', // Google Charts API will be used
'#type' => 'line2D', // A simple line chart
'#height' => 100, // in pixels
'#width' => 200, // in pixels
$values, // This is the contents of the array build above
);
return charts_chart($chart);
}
but this just throws me a Syntax error or access violation: 1064