RE: [PHP] search

From: Date: Sat, 17 Feb 2001 11:54:33 +0000
Subject: RE: [PHP] search
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-40308@lists.php.net to get a copy of this message
it's such a complex question and answer that i really think you need to ponder some more fundamental design concepts before you ask for advice on actually coding the thing... such as what type of database layout fits the type of information you will be storing/searching/retrieving, how you want to categorize the information in your database, how the interface will look and operate (do you want to allow boolean expressions, or just search for any occurence of any word in the search field) to get a very simple searcher thing working, it's not very hard (ive done it in perl/MySQL for a site that had about 20 static HTML pages and some news stories in a database table) and it took me about half a day however, you have to know what you want to accomplish beforehand or else you'll bang your head against the wall quite often during development :) if you're going for an exremely simple searcher with few features and not too much flexibility, i'd reccomend creating a keyword lookup table that simply relates keywords to the thing they refer to (HTML page, PHP page, etc...) the table might look a bit like this, if you had two pages and a total of two keywords: key | page ------|------------ "foo" | "firewall.html" "bar" | "vpn.html" "bar" | "firewall.html" then, when people entered either "foo" or "bar" (or "foo bar") into your search field, the resulting query would be a list of pages that were associated with either (or both) of those keywords. "foo" = "firewall.html" "bar" = "vpn.html" "foo bar" = "firewall.html" and "vpn.html" > -----Original Message----- > From: Brandon Feldhahn [mailto:BrandonFeldhahn@earthlink.net] > Sent: Friday, February 16, 2001 23:07 > To: php-general@lists.php.net > Subject: [PHP] search > > > How do i make a php and MySQL search engine? > >

« previous php.general (#40308) next »