Question, what to do when finding an error while validating data

From: Date: Mon, 05 Apr 2004 17:18:51 +0000
Subject: Question, what to do when finding an error while validating data
Groups: php.general 
Request: Send a blank email to php-general+get-182379@lists.php.net to get a copy of this message
I'm making a conscience effort to improve my PHP skills, that being making objects, unit testing, better error handling etc. So I have a questions. I have a database that is storing all of my records. One column is of type enum where the two legal values currently are "home" and "work"; "work" is default. I'm building a PHP object that will be my interface to the DB. In the object I have a variable called $EmailType which will hold the value of the database column. I wrote some set and get methods to work with the variable and am now asking myself: What should I do if someone tries to set $EmailType to a value that is not listed in the enum set? Please give me some advice. Thanks! ~ Mike ----- Mike Zornek Web Designer, Media Developer, Programmer and Geek Personal site: <http://MikeZornek.com> New Project: <http://WebDevWiki.com>

« previous php.general (#182379) next »