Search engine using Mysql and PHP
| From: | Vikesh | Date: | Mon, 02 Oct 2000 18:59:53 +0000 |
| Subject: | Search engine using Mysql and PHP | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-3228@lists.php.net to get a copy of this message | ||
Hi FOlks,
I'm developing a website for an IT recruitment agency
and would like some info on the following.
I have a html textfield that accepts input from the
user regarding their skills set.
This can be just one word (eg. HTML) or several (eg.
JAVA C++ PHP ASP).
I'm wanting to use these words to search a MySQL
database which has a field called "Description" which
holds information on a vacancy including the skills
required.
The way i thought to do this was to 'explode' the
returned string from the form, and assign them to
variables and use a query such as:
SELECT * FROM tablename WHERE description LIKE
'%$desc1%' AND description LIKE '%$desc2%' AND
description LIKE '%$desc3%' ..... and so on......
However i do not know the number of skills that the
user may enter and also what if the user enters a
string like 'visual basic' where it should be read as
one variable but may get split into two cause of the
space inbetween.
also i need the search to return results firstly using
'desc1' AND 'desc2' AND 'desc3' syntax, then once that
is exhusted, i need it to return results where only
one or two of the words are mentioned.
There are several points here that i have mentioned
and I hope some one is able to follow what i have
said, and also possibly provide a suitable solution.
Many thanks,
Vikesh.
__________________________________________________
Do You Yahoo!?
Yahoo! Photos - 35mm Quality Prints, Now Get 15 Free!
http://photos.yahoo.com/