Try this:
echo "REPLACE INTO table_name (dr) VALUES ('0');" |
/usr/local/mysql/bin/mysql -u user -p password activity
or mysql -e "REPLACE INTO table_name (dr) VALUES ('0');" activity
-----Original Message-----
From: Webmaster [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 03, 2002 10:57 AM
To: [EMAIL PROTECTED]
Subject: Updating tables via cron
I tried to search the archives for this but I can't find it. (Not
saying
it isn't there just I could not find it.) I have a table that tracks
events on a monthly and daily basis. Currently I am resetting the
appropriate fields to 0 on a daily and monthly basis (not fun). Is there a
way to set a command in the cron table to do this for me
automatically? Here are the details.
db name: activity
daily field name: dr (needs to be reset to 0)
monthly field name: mr (same as above)
I know how to tell cron the date/time I want an event to trigger,
but I
don't know the syntax of the command to send. Any help would be
appreciated.
Thanks,
David
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php