Posted by toedipper on 11/03/05 00:48
Hello,
PHP and mysql
I have the following select statement whch gives me a count for
downloads for previous day.
SELECT
COUNT(swid)
FROM
downloads
WHERE
date = current_date()-1
This works on every day of the month except the 1st day....so on 1st
November my values for 31 Oct showed 0 even though elsewhere I could see
that there was activity. It was the same on 1 Oct for 30th Sept and
will be no doubt the same on 1st Dec for 30 Nov.
Any ideas on why it shows zero? Does current_date()-1 have problems
when it's the first day of month?
Thanks,
td.
Great news!
Cure found for Bird Flu!
http://www.pocketpcheaven.com/birdflue.php
Navigation:
[Reply to this message]
|