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

    Join Date
    Sep 2000
    Location
    india
    Posts
    0
    Rep Power
    0
    here if we give the keyword as sony discman shock . the keyword is the product name.
    here i have to select datas. here
    sony discman is the product name of same.
    shock is another product. here i separate the string using explode function, what the thing three records are retrieved. ie.,the same record of product name is retrieved twice.how to solve this .
    help me very soon.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Posts
    82
    Rep Power
    15

    I think I know what you are asking.

    Try using a DISTINCT clause on your select statement.

    select DISTINCT product_name from products where product_name like '%sony%' pr product_name like '%discman%'

    Hope thats what you are asking.

Similar Threads

  1. How to select a DropDownList based on string value
    By vb.net in forum .Net Development
    Replies: 6
    Last Post: March 30th, 2004, 10:41 PM
  2. question on string comparison in SELECT statements
    By akumasama in forum MySQL Help
    Replies: 1
    Last Post: February 10th, 2004, 07:50 PM
  3. Need to substitute pattern match for string
    By VytamynJ in forum Perl Programming
    Replies: 3
    Last Post: February 10th, 2004, 09:46 AM
  4. array explode ( string separator, string string [, int limit])
    By beemee_freeserv in forum HTML Programming
    Replies: 4
    Last Post: February 5th, 2004, 10:56 AM
  5. search word in big string.
    By tommy916 in forum PHP Development
    Replies: 8
    Last Post: January 26th, 2004, 01:27 AM

IMN logo majestic logo threadwatch logo seochat tools logo