[PHP] Match Vs Where - Fulltext Search

2004-09-28 Thread Harlequin
Hi all.

It took me some time to discover that you can't use a MATCH | AGAINST 
statement unless you create an fulltext index of the fields to search at the 
same time. Strange, I know.

What's more strange is that as I read more I wonder why people use it 
because it will only seartch complete words, will not search on words that 
are 3 characters or less, treats hyphenated words as seperate words and has 
a whole long list of excluded words.

OK, so I'll use the following:

[code]$query = SELECT * FROM MembersData
WHERE `UserID`
LIKE '$Keyword01'
or `UserID`
LIKE '$Keyword02'
or `UserID`
LIKE '$Keyword03'
or `UserID`
LIKE '$Keyword04'
or `UserID`
LIKE '$Keyword05';
$Data = mysql_query($query) or die(Error 1:  . mysql_error());[/code]

But the only problem I see with this is that although it allows me to search 
using wildcards and partial words it seems a very lengthy way of completing 
the task because I think I would have to repeat this statement with 
something like OR WHERE for each field I wanted to search.

I know this post is lengthy and I apologise for putting you to sleep but I'd 
really love to get to the bottom of this one sometime soon. Has anyone else 
experienced similar frustrations searching their databases - I can't be the 
only one...!

-- 
-
 Michael Mason
 Arras People
 www.arraspeople.co.uk
- 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Match Vs Where - Fulltext Search

2004-09-28 Thread Jay Blanchard
[snip]
I know this post is lengthy and I apologise for putting you to sleep but
I'd 
really love to get to the bottom of this one sometime soon. Has anyone
else 
experienced similar frustrations searching their databases - I can't be
the 
only one...!
[/snip]

What you are dealing with here, Michael, is a SQL/MySQL problem. We
often have these problems. These problems do have a cure. Let me
recommend a specialist at http://lists.mysql.com . 

/canIchargeaconsultingfee?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php