Re: [PHP-DB] How to eliminate bad fields from a mysql query?

2001-03-30 Thread Phil Jackson
If there are some fields that you absolutley require, or must be in a valid format, I'd use javascript to edit the form first - no reason to make a round trip to the server for something you can do server-side. **Or** - say the form is for selecting an automobile - make is required but color isn

RE: [PHP-DB] How to eliminate bad fields from a mysql query?

2001-03-30 Thread Oson, Chris M.
Bob, Don't know if this is what you're looking for, but you *could* do something like: $noData = true; $strSQL = "SELECT field1, field2, field3 FROM table "; $results = mysql_query($strSQL, $db) or $noData = false; if ($noData) { print ""; while (list($field1, $field2, $fiel