Class 9 – Adding search functionality to your site
Posted: July 22nd, 2009 | Author: amos | Filed under: mysql, search | Tags: class 9 | No Comments »A few of you may be interested in adding search functionality to your sites. Unfortunately, creating a really good search is something that is far beyond the scope of this course.
However, there are a few simple options: using MySQL’s built-in search features, and using Google Search on your site.
Using MySQL to do search
I have written a post outlining the built-in search features available in MySQL. It is obvious but nevertheless important to note that in order to use MySQL’s search features, you need to have all the searchable data on your site stored in MySQL tables.
Using Google Custom Search
Google Custom Search is relatively easy to add to your page, and does not require you to be using MySQL. You simply copy and paste some code that google generates for you when you sign up for the service. This is clearly an advantage, since it will make your entire site searchable, not just those pages that use MySQL. However, there are two disadvantages: The search bar is branded with the Google logo, and when a user performs a search, they are taken to Google’s web site, which means they are taken away from your website. Click here to see an example of Google Custom Search in action.
Leave a Reply