INSTR (field name, string) Returns the position of the string in the content of a certain field. If the string is not found, it returns 0, otherwise it returns the position (starting from 1) -- for example SELECT * FROM item where INSTR(item_title , 'protective film' ) > 0 -- instr N select * from (select id, instr('protective film,'Dabao',' Hand Cream',',item_title +',') as d from item where item_title in ('Protective Film','Dabao','Hand Cream') order by d) as t;
INSTR (field name, string)
Returns the position of the string in the content of a certain field. If the string is not found, it returns 0, otherwise it returns the position (starting from 1)
-- for example
SELECT * FROM item where INSTR(item_title , 'protective film' ) > 0
-- instr N
select * from
(select id, instr('protective film,'Dabao',' Hand Cream',',item_title +',') as d from
item where item_title in ('Protective Film','Dabao','Hand Cream') order by d) as t;