Hi
I have a table in MYSQL that uses the field DATE ie. 0000:00:00.
I have already created a script that surches this field for the previous days results ie.
$Thismonth = date("Ymd") -1 ;
$Selectid2 = "SELECT Username, count(*) FROM bannerclicks WHERE Username = '$Username' and Date = '$Thismonth' GROUP BY Username";
$result = mysql_query ($Selectid2);
$row = mysql_fetch_row ($result);
echo "Total Number of Banner Clicks Previous Day -- $row[1]";
What I am looking for is a way of altering the script above to surch ALL the records in the DATE field for the the previous month, I have tried already but it just seems to bring back the result from todys day in the previous month.
Thanks
🙂