Simple Query Problem

Discussion in 'Databases' started by greatlogix, Mar 15, 2013.

  1. #1
    SELECT clrId,clrName, clrDesc, clrPicThumb FROM my_table WHERE MATCH (clrName) AGAINST ('red') AND active=1

    There are more than 5 rows which have 'red' in name(clrName). This query returns zero result but query works fine for all other colors like 'green' or 'blue'. Why its not working for 'red'?
     
    greatlogix, Mar 15, 2013 IP
  2. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,740
    Likes Received:
    28
    Best Answers:
    13
    Trophy Points:
    175
    #2
    case sensitive? and active isn't 1? have u tried without active?
     
    EricBruggema, Mar 15, 2013 IP
  3. greatlogix

    greatlogix Active Member

    Messages:
    664
    Likes Received:
    13
    Best Answers:
    1
    Trophy Points:
    85
    #3
    Case is not a problem. All are active.
    Names are like this

    Red Cotton Jersey Knit
    Flannel Red
    Red Dots on White
    White Stripes on Red
    Solid Red Woven

    and so on....
     
    greatlogix, Mar 15, 2013 IP
  4. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,740
    Likes Received:
    28
    Best Answers:
    13
    Trophy Points:
    175
    #4
    Why not using like on the table? where 'field' like '%red%' does that solve the problem? if this works, the previous option should also work!?
     
    EricBruggema, Mar 15, 2013 IP
  5. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #5
    From the manual:
    Could that be your problem?
     
    Rukbat, Mar 15, 2013 IP