Could I suggest please that you use MySQL's built in date finctions and group statements to make your life a LOT easier:
Rather than trying to build some date in PHP and hand it to MySQL:
UPDATE DayCount SET tableDate=CURRENT_DATE()
Or
INSERT INTO DayCount SET tableDate=CURRENT_DATE()
Although this separate DayCount table is really unneeded, and should in fact be avoided.
I assume you have some date capture on another table, like Visitor?
SELECT count(*) FROM Visitor WHERE
visitDate=CURRENT_DATE()
Will returnthe number of today's visitors.
For yesterday's visitors
SELECT count(*) FROM Visitor WHERE
visitDate=CURRENT_DATE() - INTERVAL 1 DAY
To see all visitors counts by all days:
SELECT visitDate, count(*) FROM Visitor GROUP BY visitDate
ORDER BY visitDate DESC