#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2000
    Posts
    15
    Rep Power
    0
    Hi there.. just wondering.. I'm having some trouble with a search engine I'm creating.. it's to search a database field for the keywords specified by the user.. anyone got any idea as to what the SQL query for that would be? I tried:-

    SELECT FROM entries WHERE keywords LIKE '*$search*'

    and it didnt really work.. returned 0 results where it should have given 2.. GRRR...
  2. #2
  3. Wiking
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Sep 2000
    Location
    Sweden
    Posts
    3,608
    Rep Power
    26
    Replace '*' with '%' and you'll get better results...
    select * from entries where keywords like '%whatever%'
    You could also peek at this to get some useful ideas. http://www.devshed.com/Server_Side/PHP/Search_Engine/

    /NoXcuz
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2000
    Posts
    15
    Rep Power
    0
    Cheers mate, all hail to thee! I now feel inadequate!

Similar Threads

  1. How would one make a pay-per-click search engine?
    By bllott in forum PHP Development
    Replies: 1
    Last Post: February 13th, 2004, 12:06 AM
  2. search engine in java
    By mahnaz in forum Java Help
    Replies: 2
    Last Post: February 11th, 2004, 06:03 AM
  3. search engine project
    By mahnaz in forum Project Help Wanted
    Replies: 0
    Last Post: February 10th, 2004, 08:15 AM
  4. iframes that are orphaned by search engine.
    By junpei in forum HTML Programming
    Replies: 2
    Last Post: February 6th, 2004, 12:15 PM
  5. Search engine results problem
    By WillyWoo in forum PHP Development
    Replies: 3
    Last Post: January 29th, 2004, 06:35 AM

IMN logo majestic logo threadwatch logo seochat tools logo