#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    109
    Rep Power
    15
    Can anybody tell me how i use the select function with LIKE?

    I tried:

    $result = mysql_db_query("database","select * from table where title='%$search%' or text='%search%'");

    Where title is a char (80)
    and text is a text

    Thanx!
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    2
    Rep Power
    0
    The query should read:

    select * from table where title LIKE '%$search%' or text LIKE '%$search%'


IMN logo majestic logo threadwatch logo seochat tools logo