RE: [mysql-support] RE: [PHP-DB] Run php page automatically
| From: | Jonathan Hilgeman | Date: | Thu, 20 Dec 2001 22:14:03 +0000 |
| Subject: | RE: [mysql-support] RE: [PHP-DB] Run php page automatically | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-15167@lists.php.net to get a copy of this message | ||
In my opinion, PHP works fine with small scripts like this. True, it could
be more efficient with Perl, but when you don't know Perl, or don't have DB
perl modules installed, PHP scriptlets are a nice way to take care of small
tasks. And PHP can just as easily run a system command and append text to a
log file:
system('echo "A new message" >> MyLogFile');
I used to think that PHP was only for the purpose of viewing through web
pages, but I've since found that it really can make a handy system tool
sometimes when Perl is a hassle.
- Jonathan
-----Original Message-----
From: NiteHaqr [mailto:nitehaqr@chaoscrypt.net]
Sent: Thursday, December 20, 2001 1:53 PM
To: Jonathan Hilgeman; harpreet@crispincorp.com; php-db@lists.php.net;
support@mysql.org
Subject: RE: [mysql-support] RE: [PHP-DB] Run php page automatically
I would probably recommend AGAINST running this php script from cron.
I have a similar script but I use a PERL version for auto-updates.
PHP should only (IMHO) be used where someone will see some output on a
webpage.
Other advantage of using PERL is that you could easily create a log file by
redirecting the output (or PRINT statements) to a file using simple
redirection (> and >>) instead of having to actually manipulate the file.
Just my tuppenceworth.
David
-----Original Message-----
From: support-admin@mysql.org [mailto:support-admin@mysql.org]On Behalf
Of Jonathan Hilgeman
Sent: 20 December 2001 19:22
To: 'harpreet@crispincorp.com'; php-db@lists.php.net; support@mysql.org
Subject: [mysql-support] RE: [PHP-DB] Run php page automatically
I usually just create a cron job for this. Create your PHP script that will
delete the matching records once. Then go into cron and have it run every 10
minutes.
- Jonathan
-----Original Message-----
From: Harpreet [mailto:harpreet@crispincorp.com]
Sent: Thursday, December 20, 2001 11:21 AM
To: php-db@lists.php.net; support@mysql.org
Subject: [PHP-DB] Run php page automatically
I would like to create a php page that would automatically run every 10
minutes or so to delete records from a table. This table has an expiration
field and records r tested by comparing current date with the expiration
date and record is deleted if expired.
Is this possible.
Help is greatly appreciated.
I am using php for my application. I am working on a LInux server and using
mysql as my database.
regards,
Harpreet Kaur
Software Developer
Crispin Corporations Inc.
--
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
_______________________________________________
To unsubscribe yourself from this list please go to
http://www.mysql.org/mailman/listinfo/support
and read the unsubscription
information.
support mailing list
support@mysql.org
http://www.mysql.org/mailman/listinfo/support