Implementing an Intuitive Database Search System for Your Websites
Home >> Computers & Technology >> Software >> Implementing an Intuitive Database Search System for Your Websites

Implementing an Intuitive Database Search System for Your Websites

Word Count: 617 | Comments: 0 | Article Views: 123 | Share this article on

If you have been running websites for a while, an important aspect that’s present among all your websites would be a search function. With so much data to filter through, a search system that can deliver intuitive and accurate results would boost your visitors’ appreciation of your website’s usability. While such a search system that could be used for searching articles, product catalogs, names, locations, people, prices, videos, music and so forth would seemingly be the most used tool for locating specific information, most sites are still lacking in a good implementation.

While most sites are able to give you a basic AND search with looks for every keyword in your search term, they are unable to provide something that has the ability to perform AND, NOT, OR and Phrase searches in exactly the same way as the larger sites do it, by using pluses, minuses, and double quotes for signifying AND, OR, NOT and Phrase Searches.

As an opportunistic web developer, I’ve been looking around for such a system to be implemented in my PHP based websites. All of my websites are powered by MySQL, and it should be no accident that I stumbled upon a really interesting script which was exactly everything I have been looking for.

It’s called PHP MySQL Search Script by G33k Tools. PHP MySQL Search Script is a PHP script that automatically parses the search terms as entered by my site users and generate complex SQL search queries to be executed. Basically, it’s a very useful library that allows my site users to do AND, OR, NOT and Phrase Searches by typing search terms such as:

“web development“ +mysql +php | perl -python -ruby -“shell scripting“

What’s even more useful is that this software can produce the generated query with just one line of code, which is a function call. As a bonus, this script can also automatically highlight the search terms within the search result text. What it did for me, was to transform a simple AND search for all keywords into a highly flexible search filter in less than five minutes and one line of PHP function call. The search query generated for MySQL was flawless and I’ve since then integrated this advanced search into all of my applications as it provided more value to my website users with very little effort. With this neat database search engine script, you could easily use it for searching multiple database fields by joining the generated queries.

So far, that’s the only product that I’ve found to be useful enough and easy enough that just works out of the box. Now, my next step would be looking for something that could integrate synonym words as well, so that a user searching for cups might also get mugs or shot glass returned, with the site administrator being able to add in the dictionary words that should serve as the synonyms. Of course, based on past behavioral study, it would also be possible to track the results users clicked on and to increase the order ranking of the results based on past statistics and to provide relevant search keywords as well.

Kindly drop me a note if you do find such a system, although it does sound like something that has to be custom-made.

Eshkarvin Kenezer - About the Author:

Eshkarvin Kenezer is an avid property investor. He executes highly strategic investment moves by buying at the right time and location and then selling to the right buyer. He owns multiple property websites such as Ameera Residences, which is a kind of niche portal for buying and selling specific property projects. During his free time, he masters more advanced topics on web development and systems programming.


Link references from the article: PHP MySQL Search Script by g33k tools


* Required fields
Type the characters you see in the picture below.*