Match Against Query with Integers
| From: | Harry G | Date: | Tue, 27 Jul 2004 02:46:48 +0000 |
| Subject: | Match Against Query with Integers | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-35469@lists.php.net to get a copy of this message | ||
Hi
Here's the senario...
Table 1- members
id - firstname - middlename - ....- country - region3
Fields country and region3 hold the integer codes for country and region3 is state
Table 2- country
id - countryname
Countryname is where the actual Country name is stored and id is the country code
Similarly Table 3 - region3
id - region3 where region3 is the state name and id is the region code.
I want to query country code and state code in the database but the fields are integer values. I am
trying to modify the following query, but I think it will not work for integers? Is that correct??
$keywords are the contry & state codes (integers).
$query = "
SELECT id, firstname, familyname, middlename, fathername, region3, region4, country,
MATCH(country, region3, region4) AGAINST ('$keywords' IN BOOLEAN MODE) AS score
FROM members
WHERE MATCH(country, region3, region4) AGAINST ('$keywords' IN BOOLEAN MODE) ORDER
BY score DESC";
Thanks
Harry