Page 1 of 1

Full-Text Queries

Posted: Tue Sep 05, 2006 8:17 am
by dunc
Hey..

I have been using:

Code: Select all

SELECT *
FROM table
WHERE condition = x
For example, taken from my post at viewtopic.php?t=54922, this long line of SQL:

Code: Select all

"SELECT *
FROM profile
WHERE commonName LIKE '%$search%'
  AND species LIKE '%$searchSpecies%'
  AND genus LIKE '%$searchGenus%'
  AND category LIKE '$searchCatInp%'";
I've been told that's a very inefficient and slow method of searching - and to be fair, when we have nearly 1000 profiles, a search does seem to take a few seconds.

Is there a better way of doing that search using SQL's FULLTEXT command?

Regards,
Dunc

Re: Full-Text Queries

Posted: Tue Sep 05, 2006 8:19 am
by feyd
dunc wrote:Is there a better way of doing that search using SQL's FULLTEXT command?
yes.