Lamar, Why store that information? You'll be constantly updating your table. I do something similar keeping softball stats for my team. I just keep the raw data and do all calculations, i.e. batting average, slg pct, winning pct, obp pct, etc. in the queries that generate the web pages or reports.
BTW - you would need some type of Trigger for what you're talking about and I don't think mySQL supports triggers yet. mike Thnx. -----Original Message----- From: Seifuddin, Lamar T.* (LSEIFUDD) [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 08, 2002 4:21 PM To: [EMAIL PROTECTED] Subject: mysql - sql - auto-update cmd? Hello All, I am using mysql on Linux - RedHat 7.1. The basic stuff is simple, cool, too. I am a newbie, so forgive me if this is too simple a question. Is there a mechanism available somewhere in doing an "automated" update of a field. example. team is a table. wins, losses, pct are fields of team table. I want to enter wins and/or losses and have pct be automatically updated. where pct is wins/(wins + losses) or do I have to write a script (not lazy, just wanted to know if something was available) I appreciate any advice or direction. thanks, Lamar --------------------------------------------------------------------- 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