Simple SQL Search Query

Discussion in 'PHP' started by scottlpool2003, Dec 13, 2007.

  1. #1
    Hi...

    I need to setup a search section for my db.

    Search box, to search for name, category, image and display the results:

    As the name above the image and the category below the image.

    I know it's a lot to ask but I've been trying for 6/7 hours and I've got nowhere!

    Please help!

    Scott.
     
    scottlpool2003, Dec 13, 2007 IP
  2. RoXur777

    RoXur777 Peon

    Messages:
    59
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    $query = "SELECT * FROM {$table} WHERE {$field} LIKE '%{$keyword}%'";
     
    RoXur777, Dec 13, 2007 IP
  3. scottlpool2003

    scottlpool2003 Well-Known Member

    Messages:
    1,708
    Likes Received:
    49
    Best Answers:
    9
    Trophy Points:
    150
    #3
    Thanks, how would I intergrate that into a search box though?

    I'm useless with PHP & SQL, that's why it's been taking so long.

    Scott.
     
    scottlpool2003, Dec 14, 2007 IP