RE: 5 hours later - sql error.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




can you post the code that creates the sql statement

bastien


From: Stuart Felenstein <stuart4m@xxxxxxxxx>
To: "Gryffyn, Trevor" <TGryffyn@xxxxxxxxxxxxxxxxx>, php-db@xxxxxxxxxxxxx
CC: Stuart Felenstein <stuart4m@xxxxxxxxx>
Subject: RE:  5 hours later - sql error.
Date: Thu, 2 Dec 2004 14:50:24 -0800 (PST)


--- "Gryffyn, Trevor" <TGryffyn@xxxxxxxxxxxxxxxxx> 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

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


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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux