// Setup Variables
$query = "SELECT Symbol, `Completion Date`, COUNT(Symbol) FROM CleanedCalendar GROUP BY Symbol,`Completion Date`";
$result2 = mysql_query($query) or die(mysql_error());
// Print out result
while($row2 = mysql_fetch_array($result2)){
echo "There are ". $row2['COUNT(Symbol)'] ." ". $row2['Symbol'] ." items." . " ". $row2['Completion Date'];
echo "<br />";
}
The following code sorts my entire table. How would I make it only display the last 90 days?
I tried adding WHERE STR_TO_DATE(`Completion Date`, '%W, %M %e, %Y')
BETWEEN CURDATE() AND CURDATE() + INTERVAL (90) DAY;";
but it said I had the wrong syntax by where.