--- 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 posting the
--- 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.
?php
session_start();
$currentPage =
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:
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 would
--- 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
query like
--- 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 the query...
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()
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.
--- 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.
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
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: Thu, 2 Dec 2004 14:50:24 -0800 (PST
11 matches
Mail list logo