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

    Join Date
    Sep 2000
    Location
    Piscataway, NJ, USA
    Posts
    10
    Rep Power
    0
    What is the SQL statement to do a keyword search using mySQL and Perl DBI??

    For some reason the following is NOT functioning like a keyword search, but rather only retrieves a row if it is an EXACT match.


    # not functioning
    $statement = "SELECT query FROM graphics WHERE query LIKE $quotedString";

    so whats the deal??? help me out please.
  2. #2
  3. No Profile Picture
    RyanP
    Guest
    Devshed Newbie (0 - 499 posts)
    I think you need to append and prepend the % wildcard

    try

    $statement = "SELECT query FROM graphics WHERE query LIKE %$quotedString%";

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, 01:06 AM
  2. how to make perl script work?
    By gencoglu in forum Perl Programming
    Replies: 1
    Last Post: February 9th, 2004, 01:35 PM
  3. Perl DBI and PDF-Blob's
    By DragonFire in forum Perl Programming
    Replies: 4
    Last Post: February 5th, 2004, 01:44 AM
  4. Database search highlighting problem - Stuck!
    By nro in forum PHP Development
    Replies: 5
    Last Post: January 30th, 2004, 09:44 PM
  5. Active perl multiple search when file is open
    By melinda in forum Perl Programming
    Replies: 3
    Last Post: January 28th, 2004, 05:29 AM

IMN logo majestic logo threadwatch logo seochat tools logo