![]() |
Codeignitor php array brain teaser problem Help! - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Codeignitor php array brain teaser problem Help! (/showthread.php?tid=42057) |
Codeignitor php array brain teaser problem Help! - El Forum - 05-24-2011 [eluser]kiwimediapro[/eluser] I have the following query: Code: SELECT SUM(t1.totalprice) as totalprice, This returns the following data: No_Sales Year Month --------------------------------------- 588 2009 September 660 2009 October 524 2009 November 521 2009 December 609 2010 January 619 2010 February 732 2010 March 605 2010 April 736 2010 May How do i get this into this into Google stacked column chart so that the Y-axis is No_sales, the x_axis months and the graphs key is the years. So the data is grouped by years. I have attempted various techniques but just cant seem to nab it. I have the controller,model and view files attached. Thanks for any help. Codeignitor php array brain teaser problem Help! - El Forum - 05-26-2011 [eluser]kiwimediapro[/eluser] Anyone have any ideas? Codeignitor php array brain teaser problem Help! - El Forum - 05-30-2011 [eluser]vitoco[/eluser] if you put the format/estructure that you need it get easier to help you, cause in my case i don't know the "Google stacked column" format. Saludos Codeignitor php array brain teaser problem Help! - El Forum - 05-30-2011 [eluser]kiwimediapro[/eluser] Yes I gues that would help. :-) It is in the attached files in the view. Here it is: raw_data = [['<yr1>',month1,month2, etc...],['<yr2>',month1,month2, etc...]etc...] raw_data=[['2009',728,640,636,636,635,682,681,588,588,660,524,521],['2010',609,619,732,605,794,35]]; |