php - How to get a single value form multiple values in a Mysql field -
i have created mail table have following fields.
id mail_to mail_subject mail_message 1 6,9,10 test mail test message 2 4,8,6 test mail test message
values stored in mail_to field id of users. want display mail mail_to 6. how use condition in case.
i tried achieve result query did not work.
select * tbl_profile_inbox mail_to = '6' ;
can guys on one.
you can use find_in_set()
that:
select * tbl_profile_inbox find_in_set('6',mail_to)
Comments
Post a Comment