SalientAnimal Posted June 29, 2012 Share Posted June 29, 2012 Does anyone here use PHPGraphLib? I'm using this on my page to display graphs, but when running a query to get the data, I only get one bar on my graph, despite the fact that I am grouping the information by username. Any help? My Query Collecting Data: $sql="SELECT *, COUNT(*) AS 'queries' FROM product WHERE status = 'Open' GROUP BY username "; $result = mysql_query($sql) or die('Query failed: ' . mysql_error()); if ($result) { while ($row = mysql_fetch_assoc($result)) { $status=$row["Open Query"]; $count=$row["queries"]; //add to data array $dataArray[$status]=$count; } } I've run the query in PHPMyAdmin and I get two sets of data. Link to comment https://forums.phpfreaks.com/topic/264983-phpgraphlib-problems/ Share on other sites More sharing options...
SalientAnimal Posted June 29, 2012 Author Share Posted June 29, 2012 I was being stupid here, managed to find my error. Link to comment https://forums.phpfreaks.com/topic/264983-phpgraphlib-problems/#findComment-1357908 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.