php - MYSQL: select from table where a string in a column matches? -
i'm trying select table column has string in matches criteria.
the normal way without string scenario this:
select * tablename hwere columnname='something' but lets columnname contains value this:
1,2,3,4 | someemail@yahoo.com and want select table columnname contains someemail@yahoo.com. so, how need go this?
i tried i'm 100% sure i'm doing wrong:
select substring_index(columnname,' | ',-1) tablename because don't see how where clause come in statement!
could please advise on issue?
you need use like
select * tablename columnname '%someemail@yahoo.com%'
Comments
Post a Comment