I have a this weeks current totals, from monday to monday and Last weeks totals. I have been manually updating the timestamps to reflect the current and last week. I would like have it just pull the data from the current week from monday to monday and last weeks from monday to monday
This weeks code.
echo "This Week <br />";
$result = mysql_query("SELECT * FROM form_2 WHERE timestamp BETWEEN '2011-11-7' AND '2011-11-14' AND checkcollec = 'yes'");
$num_rows = mysql_num_rows($result);
echo "<b>Checks Collected:</b> $num_rows ";
Last weeks Code.
echo "<hr />Last Week <br />";
$result = mysql_query("SELECT * FROM form_2 WHERE timestamp BETWEEN '2011-10-31' AND '2011-11-07' AND checkcollec = 'yes'");
$num_rows = mysql_num_rows($result);
echo "<b>Checks Collected:</b> $num_rows ";
How can I do this so I do not have to keep changing it manually each week.
1 Answer