sql - How to query MySQL if data in one field look like 32;13;3;33 and the condition is where 3 -


i have table in 1 column filled data 32;3;13;33;43

so

select * table;  

gives like

name ids
vegetables 13;3;63
fruits 37;73;333

when i'm querying mysql like

select * table ids '%3%' 

it gives me both records want containing 3.
how query mysql correctly?

try use:

select * table concat(';',ids,';') '%;3;%' 

Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -