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

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -