php-db | 2002122
Date: 12/16/02
- Next message: Ryan Jameson (USA): "RE: [PHP-DB] Oracle/PHP question..."
- Previous message: NIPP, SCOTT V (SBCSI): "[PHP-DB] Oracle/PHP question..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Thanks to everyone for your help. It was my own stupidity which was
collecting the wrong data. I wasn't passing the value of unit_id to my
table.
"Andre gemünd" <ag <email protected>> wrote in message
news:000b01c2a3af$753d2160$596d8550 <email protected>
> You shouldnt get any syntax errors i think
> use $sql = "SELECT * FROM resources WHERE unit_id='$unit_id' AND unit_id
IS
> NOT NULL ORDER BY level";
> as far as your unit_id is DEFAULT NULL.
> Otherwise try using WHERE unit_id<>0 AND unit_id<>'' or something like
this,
> depending on your type of variable.
>
> If this isn't solving your problem, show us more source-code and the
> table-columns definition.
>
> greets
> ag
>
> ----- Original Message -----
> From: "Alex Francis" <afrancis <email protected>>
> To: <php-db <email protected>>
> Sent: Saturday, December 14, 2002 8:37 PM
> Subject: [PHP-DB] Selecting more than asked for
>
>
> When using the statement below, as well as getting the data corresponding
to
> $unit_id, I also get any data where unit_id field is blank. I have tried
> various permutations of unit_id IS NOT NULL, but get syntax errors. Can
> someone help to get the syntax correct.
>
> $SQL = " SELECT * FROM resources where unit_id='$unit_id' order by level
";
>
>
>
>
> --
> 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
- Next message: Ryan Jameson (USA): "RE: [PHP-DB] Oracle/PHP question..."
- Previous message: NIPP, SCOTT V (SBCSI): "[PHP-DB] Oracle/PHP question..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

