I'm running into a syntax error:

You have an error in your SQL syntax. Check the manual
that corresponds to your MySQL server version for the
right syntax to use near ') AND Prof.WorkExp IN () AND

Now I printed out the query and that works as I dumped
it into a mysql client and it returned correctly.

Maybe I can get by here with out all the code. 
Basically I do a select of all the tables, then the
joins.  No where condition yet.  This is a dynamic
query - 

After the sql I have 

$aWHERE = array();

if(isset($resAge)) $aWHERE[] = "Prof_Rez.Age >=
DATE_SUB(CurDate(), Interval($resAge) DAY)";
if(isset($workAuth)) $aWHERE[] = "Prof.WorkAuth IN
if(isset($expLevel)) $aWHERE[] = "Prof.WorkExp IN
($expLevel)"; ..............etc.

$query_rsCS .= ' WHERE '.implode(' AND ',$aWHERE);

Anyway while I basically took this code from a search
that is working - what I wonder is if the where
statement is correct .  

Well let me start here and see.
Thank you 

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to