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

2004-12-02 Thread Gryffyn, Trevor
Looks like your $expLevl value is empty. It's probably set, but has no value in it. Check that. -TG > -Original Message- > From: Stuart Felenstein [mailto:[EMAIL PROTECTED] > Sent: Thursday, December 02, 2004 1:46 PM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] 5 hours later - sql error

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

2004-12-02 Thread Stuart Felenstein
--- "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 re

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

2004-12-02 Thread John Holmes
Stuart Felenstein wrote: 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. Print out the entire query before you run it. Syntax errors are usually pretty obv

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

2004-12-02 Thread Bastien Koert
can you post the code that creates the sql statement bastien From: Stuart Felenstein <[EMAIL PROTECTED]> To: "Gryffyn, Trevor" <[EMAIL PROTECTED]>, [EMAIL PROTECTED] CC: Stuart Felenstein <[EMAIL PROTECTED]> Subject: RE: [PHP-DB] 5 hours later - sql error. Date: Th

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

2004-12-03 Thread Stuart Felenstein
--- John Holmes <[EMAIL PROTECTED]> wrote: > Stuart Felenstein wrote: > Print out the entire query before you run it. Syntax > errors are usually > pretty obvious. If not, post the actual query here. I found one possible syntax error and fixed it though it seemed to have no effect. I'm postin

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

2004-12-03 Thread Stuart Felenstein
--- Bastien Koert <[EMAIL PROTECTED]> wrote: > > can you post the code that creates the sql > statement > > bastien > I'm posting the entire script. I hope it comes through legible. If not I can do an attachment so the format, line breaks will remain. 0 AND is_array($taxType)) { $s_

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

2004-12-03 Thread Graham Cossey
One observation: > print_r($query_rsCS); > if(!empty($aWHERE)); ^ Remove semi-colon ? > $query_rsCS .= ' WHERE '.implode(' AND ',$aWHERE); > print_r($aWHERE); HTH Graham -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.

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

2004-12-03 Thread Stuart Felenstein
--- Graham Cossey <[EMAIL PROTECTED]> wrote: > One observation: > > > print_r($query_rsCS); > > if(!empty($aWHERE)); > ^ Remove > semi-colon ? > > > $query_rsCS .= ' WHERE '.implode(' AND ',$aWHERE); > > print_r($aWHERE); > > HTH > > Graham > Didn't do it. :

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

2004-12-03 Thread John Holmes
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 woul

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

2004-12-03 Thread Stuart Felenstein
--- John Holmes <[EMAIL PROTECTED]> wrote: > 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 > que

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

2004-12-03 Thread Stuart Felenstein
--- John Holmes <[EMAIL PROTECTED]> wrote: > 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 th

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

2004-12-03 Thread Stuart Felenstein
John! Your the man! It works! if (!empty(var)) Excellent. I think this is a good lesson in isset. I assumed they were the same. I guess reading the manual more would help. Thank you. Stuart > --- John Holmes <[EMAIL PROTECTED]> wrote: > > > You need to check if $stateReloc2, etc are empty()