Re: 5 hours later - sql error.
| From: | John Holmes | Date: | Fri, 03 Dec 2004 11:34:30 +0000 |
| Subject: | Re: 5 hours later - sql error. | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-37539@lists.php.net to get a copy of this message | ||
Stuart Felenstein wrote:
if(isset($stateReloc2)) $aWHERE[] = "Prof.State1 IN ($stateReloc2)";You need to check if $stateReloc2, etc are empty() instead of set. If the variable is set, but empty, you're going to end up with a query like "Prof.State1 IN ()" which will cause your error, which we would have seen if you'd just posted the query... -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com