Searching a MySQL database using PHP

Discussion in 'Programming/Scripts' started by badben, Jul 5, 2006.

  1. badben

    badben New Member

    Does anybody out there know a tutorial or good script to search a MySQL database for keywords using PHP?

    Ben
     
  2. falko

    falko Super Moderator Howtoforge Staff

  3. Destroyer

    Destroyer New Member

  4. AaronDavison

    AaronDavison New Member

    Hi:cool:

    :p Wonderful info guys....The list of apps looks great.....and i thank u..:)


    edit reason.
    Links look like spam.
    Sorry if I'm wrong.
     
    Last edited by a moderator: Feb 21, 2009
  5. Angelito

    Angelito New Member

    Code:
    SELECT * FROM `PRODUCT`
    WHERE Enabled=1 AND
    (name LIKE '%".$_GET["searchstring"]."%' OR description LIKE '%".$_GET["searchstring"]."%' OR brief_description LIKE '%".$_GET["searchstring"]."%');
    It should return any record with a matching string in either specified field.

    Share your results if it works for you.

    Angel
     
  6. hardy123

    hardy123 New Member

Share This Page