Using match to serach a sting with *

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • raknin
    New Member
    • Oct 2007
    • 82

    Using match to serach a sting with *

    Hi,

    Is there any way using mysql to serach a values in a string where I don't care what is in between, for example:

    I have a row which contains the following string in the foloowing format


    row contents: xx:yy:*:zz;xx:y y:*:zz;xx:yy:*: zz

    Now I want to serach the row for xx:yy:*:zz so I don't care what is between
    the yy and the zz is there any way to do it?
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #2
    You can use the WHERE LIKE syntax.
    Like, for example:
    [code=mysql]
    SELECT col FROM tbl WHERE strCol LIKE 'start%end'
    [/code]
    The % char is the wild-card char there.

    Comment

    • raknin
      New Member
      • Oct 2007
      • 82

      #3
      Thanks for you help, it works

      Comment

      Working...