1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Searching a database

Discussion in 'HTML, Graphics & Programming' started by Red and White, 2 Jun 2006.

  1. Red and White

    Sgarrista

    Joined: 18 Oct 2002

    Posts: 8,921

    im currently setting up a database where i want users to be able to search for items in a database. whats the best way of doing this? is there anywhere where i can get free PHP scripts. my programming is really poor :(

    thanks
     
  2. senorstealth

    PermaBanned

    Joined: 16 May 2006

    Posts: 276

    Location: down the pub

    Look into using visual studio and .net, you can incorperate an sql database without any hassle and its all drag and drop so very little coding.

    plus there are tons of examples on the net (just google it)
     
  3. Bloo_Fish

    Hitman

    Joined: 9 Nov 2002

    Posts: 748

    Location: Bucks [uk]

    What database are you planning on using - you say your programming is poor - so i assume you can write the basics of a language at them moment?


    If you go down the PHP & MySQL route you will have no trouble, its fairly easy to get the basics setup and with a wealth of tutorials around the internet on PHP & MySQL apps it should be easy enough.


    To get you started.


    Get a host with PHP and MySQL / install Apache / PHP / MySQL on your own computer

    Set up you database and look into creating FULLTEXT indexes - you can then perform FULLTEXT searches.
     
  4. Conrad11

    Soldato

    Joined: 12 Jun 2005

    Posts: 5,362

    If its done locally then you will need a serve3r and you should install XAMPP. (which is a PHP server).

    From there you can create your mysql database.

    And then create your pages to search and show results using a tutorial like: This.

    Hope it helps.
     
  5. Beansprout

    Man of Honour

    Joined: 31 Jan 2004

    Posts: 16,313

    Location: Plymouth

    It's worth noting that FULLTEXT has a number of limitations such as a min. 4 character search term and the wonderful trait of show 0 results when more than 50% of the rows contain the search term, so it might not be suitable.

    A simple LIKE %term% might just be the easiest way, though not terribly fancy. Anyone know of any cool MySQL-based search algorithms? I don't :(
     
  6. Red and White

    Sgarrista

    Joined: 18 Oct 2002

    Posts: 8,921

    thanks for the advice

    i have no clue about programming, so im unsure whats the best way to go about this. ive been looking into php but it looks complicated.