mySQL Query
| From: | Ralph Guzman | Date: | Wed, 09 Aug 2000 07:12:23 +0000 |
| Subject: | mySQL Query | ||
| Groups: | php.db php.general | ||
| Request: | Send a blank email to php-general+get-10858@lists.php.net to get a copy of this message | ||
I need to write a script that will every day process reports for the
previous day. I currently have in the mySQL table, a date field that uses
this format:
YYYY-MM-DD
So if today is 2000-08-09, I need to process al reports for 2000-08-07.
I have two questions:
1. What is the best way to do this? Do I have to write this logic in my PHP
code, or can it be handled by a mySQL query.
2. Will I need to compile the cgi version of PHP so that I can run a cron
job everyday?
Any examples of how I can accomplish this are greatly appreciated.