filtering results from a recordset
Hi I had a quick look on Google, but thought it be quicker to ask on here and also to help others if anyone else requires this type of filtering....
Currently I have a statistics page on my ecommerce site which shows total costs of revenue..However I need a little direction in filtering other results.... for example I want to sum all the orders to show which month was the most popular month of the year, how much revenue was taken on a given month. popular product and popular category etc..
currently for total revenue for the website I am using the code:
<?php
$query="SELECT SUM(OrderAmount) AS `total` from orders";
$result=mysql_query($query);
$total=mysql_result($result,0,"total");
?>
but i want to expand on this to calculate what I have mentioned above.
Any direction appriciated, even if its a nice google link for me to experiment with :)
Chris