sql - How to use Like '%' in a phrase with multiple words -


let's have following table

user|text 1   |red 123 orange blue green 2   |red orange blue 3   |blue orange 123 red 

if wanted pull users text includes both '123' , 'blue', how it? want pull user 1 , 3.

select * table text '%123%'&&'%blue%' or text '%blue%'&&'%123%' 

is better solved thru using regexp function?

try code:

select * table text '%123%' , text '%blue%' 

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -