![]() |
Need help about Jpgraph or Panaci/Panachart - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Need help about Jpgraph or Panaci/Panachart (/showthread.php?tid=8419) |
Need help about Jpgraph or Panaci/Panachart - El Forum - 05-17-2008 [eluser]James Bolongan[/eluser] Hi, I need some help on how to store in array the data from a database...Like the data below, I want it that the data must come from the database. // Setup Chart $ydata = array(11,3,8,12,5,1,9,13,5,7); // the data must be from the database....please help me... :-) I already run the Jpgraph and the Panachart and I can update the data but I do not know on how to update the data that is from the database. Please someone help me. I am new to this Jpgraph and Panachart. Need help about Jpgraph or Panaci/Panachart - El Forum - 05-17-2008 [eluser]Pascal Kriete[/eluser] I've never used this software, but as it is, it's probably easiest to just store a comma seperated list in a text field. From array to csv: Code: $ydata = array(11,3,8,12,5,1,9,13,5,7); From csv to array: Code: $csv = /// get from db Hope that answers your question. Need help about Jpgraph or Panaci/Panachart - El Forum - 05-24-2008 [eluser]James Bolongan[/eluser] Thanks to your idea inparo. I try to use the implode function but Jpgraph does not work... Here is my sample code: Code: $h2O = $this->db->query("SELECT percent_h2O FROM cement"); It does not work...Then I try to result it in a row Code: $query = $this->db->query("SELECT * FROM cement"); Thanks a lot to inparo...It really helps me in coding that is more simple and easy....It is so useful in my other application right now. I still need help about the Jpgraph on how to update the data that is from the db. I dont know whats the correct syntax. The problem is the parsing of the data from the db... |