SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Feb 2007
    Posts
    71
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Search database?

    Hi Gururs,

    I recently bought PDF book ( Build your own web site the right way ) from sitepoint, which has a chapter talking about free search tools. It reminded me to ask a few questions:

    1 Can I have google tool to search my database directly? Or I have to write my own PHP search routines?

    2 If the answer is "Yes" to the above question, can I have the search result layout customized?

    3 Generally if I want to search my own web site contents stored in my database, I have to write my own PHP routines, right? And the search results layout is also my own business?

    Thanks.
    Charlie123

  2. #2
    SitePoint Guru mattymcg's Avatar
    Join Date
    Oct 2005
    Location
    Melbourne, Australia
    Posts
    574
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Charlie123!

    1 Can I have google tool to search my database directly? Or I have to write my own PHP search routines?
    I think what you're asking is "Can I use the Google search engine to power my site search?" The answer, is: yes you can. Google offer a service called Google Custom Search. It's still a beta service, but it might be what you need.

    It's not free, though. Depending on how big your site is, how much traffic you receive and how many search queries your site receives, you're looking at a cost of $100 and upwards per year.

    2 If the answer is "Yes" to the above question, can I have the search result layout customized?
    You sure can. However, if you're on an absolute budget, it is possible to use Google Search on your site for free—but you won't be able to customize the searches. You can just configure a form that searches Google and appends the query term "site:mysite.com" which will restrict the search to your domain.

    3 Generally if I want to search my own web site contents stored in my database, I have to write my own PHP routines, right? And the search results layout is also my own business?
    It sounds like you are still in the early stages of building your site. If so, I'd recommend you use a Content Management System (CMS). Many CMSes come with search engines built in, so you won't have to resort to using Google to power your search.

    There are lots of articles that have been written about how to determine which CMS is the best for your specific situation. Here are a couple: [1] [2]
    I design beautiful, usable interfaces. Oh, and I wrote a kids' book.
    Follow me on Twitter.
    Read my blog.
    Buy my book, Charlie Weatherburn and the Flying Machine.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •