can you post the code that creates the sql statement


From: Stuart Felenstein <[EMAIL PROTECTED]>
CC: Stuart Felenstein <[EMAIL PROTECTED]>
Subject: RE: [PHP-DB] 5 hours later - sql error.
Date: Thu, 2 Dec 2004 14:50:24 -0800 (PST)

--- "Gryffyn, Trevor" <[EMAIL PROTECTED]> 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

//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


//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.


PHP Database Mailing List (
To unsubscribe, visit:

-- PHP Database Mailing List ( To unsubscribe, visit:

Reply via email to