Modify Query, or sift through results?

From: Date: Wed, 27 Jun 2001 13:54:04 +0000
Subject: Modify Query, or sift through results?
Groups: php.db 
Request: Send a blank email to php-db+get-9863@lists.php.net to get a copy of this message
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

« previous php.db (#9863) next »