Page 1 of 1
Setting up a site search engine
Posted: Sun Jun 09, 2002 10:28 pm
by chris12295
I have a website where people can buy ads, kind of an online classifieds. What are the steps i should take to set up a site search engine so users can submit ads and search them using keywords?
Posted: Sun Jun 09, 2002 10:30 pm
by fatal
if you store the ads in MySQL you van easly search the database, using the "LIKE" command in your querys.
that was fast
Posted: Sun Jun 09, 2002 10:34 pm
by chris12295
how exactly would i go about setting up the database to allow people to add the ads? and how would i retrieve them using "LIKE" in my query, im new to php and MySQL.
Posted: Mon Jun 10, 2002 1:47 am
by twigletmac
It's probably best if you start with a tutorial. Try,
The manuals are also an excellent resource once you understand the basics:
Mac
Posted: Mon Jun 10, 2002 1:51 am
by Peter
An example of a like query would be:
SELECT ads FROM table WHERE keywords LIKE "search parameters" ORDER BY date, name
Posted: Mon Jun 10, 2002 10:21 am
by MattF
if you want wild cards you can do:
LIKE %word%
Posted: Tue Jun 11, 2002 1:53 am
by mikeq
but be aware that queries with a % at the beginning of a search string (select * from tablename where fieldname like '%searchtext%') take a lot longer to search for as the database has to look at every record.
Mike