Thanks Jason, It appears to work as I counted the orders in the database for that month....I just need to work out the use of date queries now, I setup this code to calculate for the revenue for current month (august in this case) however the result isnt correct... just wondered by looking at this code block it would be obvious for you to see my mistake?
$result = mysql_query('SELECT OrderAmount FROM orders GROUP BY DATE_FORMAT(OrderDate, "%Y-%m") = date_format(now() - INTERVAL 1 MONTH, "%Y-%m") ORDER BY SUM(OrderAmount)') or die(mysql_error());
$CurrentMonth = mysql_fetch_assoc($result);
Then to display as a month:
<?php echo($CurrentMonth['OrderAmount']); ?>
But as i mentioned it displays the wrong value.