Re: Modify Query, or sift through results?
| From: | Steve | Date: | Thu, 28 Jun 2001 02:33:08 +0000 |
| Subject: | Re: Modify Query, or sift through results? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-9876@lists.php.net to get a copy of this message | ||
Couldn't you use "SELECT DISTINCT" for this?
http://www.mysql.com/doc/S/E/SELECT.html
----- Original Message -----
From: "Joseph Koenig" <joe@jwebmedia.com>
To: <php-db@lists.php.net>
Sent: Wednesday, June 27, 2001 8:54 AM
Subject: [PHP-DB] Modify Query, or sift through results?
> I've got a script that searches a db every night and sends out e-mail if
> it finds something a person would be interested in, based on criteria
> they gave us. The problem is that I have one field that stores regions
> of the country in a very unpleasant way. It stores them as:
>
> Northeast;West;South
>
> So all of the regions for one record go into one field. The problem is
> that when searching that, if someone has a preference of 'North', I
> dont want to pull records that have 'Northeast', as would happen with
> the above example. Is there a way to modify the MySQL query so as to
> find only 'North', keeping in mind that 'North' may be the 3rd in a list
> of semi-colon separated regions? Or do I need to sift through the
> results in PHP to clean them up? Thanks,
>
> Joe
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>