Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: Search box

  1. #1
    New Coder
    Join Date
    Apr 2008
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Search box

    Hi

    I would like to implement a search box on my website. I have some what an idea of how to perform this from one table but have ran into a brick wall.

    I would like to perform the search across 5 tables. How would I achieve this?

    Is it possible to construct a 'google like' search functionallity on the site where the search results picked up contain the hyperlink to the page even with the querystring e.g 'categories.asp?prodid=3' relating to the search term entered?

    If 'coding forums' was entered then the search results picked up needs to consist of both words.

    How do I tackle such a task!

    Can anyone direct me in the right direction or resources in accomplishing this please?

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,437
    Thanks
    75
    Thanked 4,372 Times in 4,337 Posts
    You need to show the DB schema for those 5 tables. Which fields in which tables do you want to be able to search? (For example, it makes no sense to search for a name in a phone number field.)

    And don't worry about the querystring. If you use <form method="get"> then the browser will build the querystring for you.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #3
    New Coder
    Join Date
    Apr 2008
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The tables I have with the fields are:
    Product Pictures
    ProductCode
    HiResPath

    Products
    Productcode
    Datasheetfilename

    News
    newsStory

    Promo
    promoStory

    subcategories
    subcategoryName

    when you say not to worry about the querystring the 'form method get' will build it for me, could you elaborate on that please?


  •  

    Posting Permissions

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