RE: [PHP-DB] mySQL Query

From: Date: Thu, 10 Aug 2000 08:05:57 +0000
Subject: RE: [PHP-DB] mySQL Query
Groups: php.db php.general 
Request: Send a blank email to php-db+get-1925@lists.php.net to get a copy of this message
Hi Ralph If I was you I would not run a PHP-script with the lynx. I would put the following in top of the php-file: #!/usr/bin/php -q //if you have installed the default place.... And then i would just run it directly as a cronjob, with this line: 00 * * * * /home/user/www/public_html/script.php //remember to get the correct path '00' thats if you want to run it every whole hour. Regards, Jimi Rønberg Ralph - RG> 1. What is the best way to do this? Do I have to write this logic in my PHP RG> code, or can it be handled by a mySQL query. You could simply SELECT your data from the table according to the date you want to process. RG> 2. Will I need to compile the cgi version of PHP so that I can run a cron RG> job everyday? There's no need to have PHP as CGI to run a PHP script as a cron job. If you have PHP as a module, use lynx. You cron line will look like (assuming you want to run the script every minute): * * * * * lynx -dump http://www.yourdomain.com/path/to/your/script.php3 if the dir where the script Regards, Gianluca -- ALBASOFTWARE C/ Aribau 70 - 5º 1ª 08011 Barcelona (Spain) Tel. +34 93454009 - +34 934549324 Fax. +34 934541979 @@ ICQ 47323154 @@ webmaster@albasoftware.com http://www.albasoftware.com http://www.phpauction.org http://www.gianlucabaldo.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.db (#1925) next »