Try:

SELECT some_column FROM some_table WHERE column_value IS NOT NULL AND
unit_ID=$variable

If that's kind of what you're looking for, there's good info in the MySQL
manual about the WHERE condition and other sorting and selecting options.

HTH
> -----Original Message-----
> 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 = $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.
> 
> 
> 
> -- 
> 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

Reply via email to