[PHP-DB] Selecting more than asked for

2002-12-13 Thread Alex Francis
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

[PHP-DB] Selecting more than asked for

2002-12-14 Thread Alex Francis
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

RE: [PHP-DB] Selecting more than asked for

2002-12-13 Thread Hutchins, Richard
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

Re: [PHP-DB] Selecting more than asked for

2002-12-14 Thread Ignatius Reilly
, 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

Re: [PHP-DB] Selecting more than asked for

2002-12-14 Thread Andre Gemünd
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

Re: [PHP-DB] Selecting more than asked for

2002-12-16 Thread Alex Francis
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