At 10:37 24.02.2003, Miguel Br�s said:
--------------------[snip]--------------------
>//logical request
>if ($nome) {
>$sql="aviao = '$nome' ";
>}
>if ($code) {
>$sql="code = '$code' ";
>}
> $query = "SELECT * FROM ssr WHERE";
> $query .= $sql;
--------------------[snip]--------------------
Hi,
I've copied only the relevant lines of your program.
The issue here is that your string concatenation results in
SELECT * FROM ssr WHEREaviao = 'Airbus'
Note the missing space after "WHERE". Your code should better read
$query = "SELECT * FROM ssr WHERE ";
$query .= $sql;
Have an eye on the added blank after WHERE.
HTH,
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php