A community in which webmasters can ask for help with topics such as PHP coding , MySQL , IT jobs, web design, IT security.
Current location:homephp forumphp talk in 2009 yearHow do I do a search on my website - page 1
User InfoPosts
How do I do a search on my website#1
I wanted to add a search feature on a website that would allow users to search the whole website.

The site has around 20 tables and i wanted the search to search through all 20 tables.

Any one can point me into what sort of mysql queries I need to build?

posted date: 2009-04-09 04:23:00

Re: How do I do a search on my website#2
I had made out the solution of this problem. click to view my topic...

hope that hepls.

posted date: 2009-04-09 04:23:01

Re: How do I do a search on my website#3
First of all, what about adding custom Google websearch to your site?The hard way: You should propably do a query for each of your tables and LIMIT (with LIKE on text columns or use full text indexing if your database software supports this) the result to X (e.g. ten) results. In your code, somehow rate these results and display the X best results.You could also try to use a UNION of multiple queries but then the resulting tuples all have to same structure (if I remember correctly).

posted date: 2009-04-09 04:27:00

Re: How do I do a search on my website#4
Search engines. My Comp Sci degree thesis. First of all you have to ask yourself the question. What type of search do you want to offer the user. If the user will clearly know what they are looking for, for example a product based website then you should provide a search engine based on meta-data. For example users will be searching for a specific product, or product type. This is generally quite easy to provide.The next is your familiar web search engine such as Google. Google here targets a completely different market. The typical user doesn(t know exactly what they are looking for. They just know that they are looking for something to do with Aeroplanes for example. Now Google has to try and figure out what is the result that is most likely to match that and be the most relevant. I know Google has an incredibly complex and optimised system but from memory if you want to go this way you need to create something called an inverted index file. Then you need to start thinking about a thesaurus because what if the user types in cat, then you should also provide results that contain the word feline. Also word trees, because the user typed in cat the cats result will also be relevant.I am pretty sure that if you are providing a search engine for your website then it most likely be a metadata search engine in which case you can roll your own solution. If not and you are looking for the second type then why not use Google(s services. They provide a custom search that will work within your own website.

posted date: 2009-04-09 04:32:00

Re: How do I do a search on my website#5
1.: Set a FULLTEXT index on the fields with the content and use the fulltext search mysql provides: http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.htmlor2.: Have a look at the lucene search the Zend Framework provides: http://framework.zend.com/manual/en/zend.search.lucene.html

posted date: 2009-04-09 04:33:00

Re: How do I do a search on my website#6
have u tried looking at lucene? its one of the best search modules available today. i would strongly suggest you to give it a shot

posted date: 2009-04-09 04:44:00

Re: How do I do a search on my website#7
Use Sphinx or if you(re using ZF — Lucene.

posted date: 2009-04-09 04:59:00

select page: « 1 »
Copyright ©2008-2017 www.momige.com, all rights reserved.