RE: [PHP-DB] Selecting more than asked for
| From: | Hutchins, Richard | Date: | Fri, 13 Dec 2002 19:38:57 +0000 |
| Subject: | RE: [PHP-DB] Selecting more than asked for | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-24136@lists.php.net to get a copy of this message | ||
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:afrancis@camerondesign.co.uk]
> Sent: Friday, December 13, 2002 2:35 PM
> To: php-db@lists.php.net
> 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
>