RE: [PHP-DB] 5 hours later - sql error.

From: Date: Thu, 02 Dec 2004 22:50:24 +0000
Subject: RE: [PHP-DB] 5 hours later - sql error.
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-37531@lists.php.net to get a copy of this message
--- "Gryffyn, Trevor" <TGryffyn@air-cargo-inc.com> wrote: > Looks like your $expLevl value is empty. It's > probably set, but has no > value in it. Check that. > No sorry to say that isn't it. It seems that for every field i submit in the search, it's the field right after where the syntax error is reported. So , maybe it's not truly a syntax error. Just to reiterate (and it's like 75 lines of code, so I'm going to spare the group) $aWHERE = array(); $query_rsCS = "SELECT .........[the rest of the select]................." //Here are the clauses for the dynamic query //There are 50+ so, this is how they are written if(isset($workAuth)) $aWHERE[] = "Prof.WorkAuth IN ($workAuth)"; if(!empty($aWHERE)); //This is how I attach the where clauses where user //has chosen a field $query_rsCS .= ' WHERE '.implode(' AND ',$aWHERE); Now I've printed out the query, but it only prints out right up to the where clause. To me it looks like the where clause is not taking correctly but I'm not sure why or how to know for usre. I'm tried print_r ($query_rsCS) but it's returning nothing. Either it's empty for some reason, or the suppposed syntax error is stopping it. Stuart

« previous php.db (#37531) next »