I am using PHP and MySQL and in one section I am trying to SELECT for a
table where unit_id = $variable. In that column I have several blank items.
When I select a particular variable I get that plus all the blanks. I
presume there is some way of getting just those which meet my criteria.
--
PH
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 whe
t; From: Alex Francis [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 13, 2002 2:35 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Selecting more than asked for
>
>
> I am using PHP and MySQL and in one section I am trying to
> SELECT for a
> table where unit_id = $var
, 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
e 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" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, December 14
it_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