Ctech Posted July 25, 2007 Share Posted July 25, 2007 Hi, I'm creating a table based on a mySQL query with a few extra custom columns. The table are displaying average data based on the query in each cell. Something that works fine. My problems is in the sum row. Which is supposed to give the average of the averages of all the data that is used to calculate the averages above. I have tried various ways to get this done, bt I might be trying it the wrong way. See below for my code. Here are en example of the output of my code.. it is the first tabel that I am having problems with http://www.oddjobs.no/finnkode/finnview.php?Area=Uranienborg+-+Majortstuen&Submit=Velg PHP code is in the pastebin http://pastebin.com/m6f7ac802 I hope you understand my code.. and the problem.. and that you have a solution... Thanks Quote Link to comment Share on other sites More sharing options...
teng84 Posted July 25, 2007 Share Posted July 25, 2007 pardon? Quote Link to comment Share on other sites More sharing options...
ss32 Posted July 25, 2007 Share Posted July 25, 2007 maybe your desired result could be completed better with aggregation and the AVG() function? Quote Link to comment Share on other sites More sharing options...
Ctech Posted July 25, 2007 Author Share Posted July 25, 2007 Sorry guys, Non of your replayes helped in anyway... I guess what I need to do is count each entry in each array in each cell. And tehn add that to a new array for that column. and then do the same for the values.. and then divide them in hte end.. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.