I have created a mail table where i have the 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 are id of users. I want to display all the mail where mail_to is 6. How to use the where condition in this case.
I tried to achieve the result with this query but it did not work.
SELECT * FROM tbl_profile_inbox WHERE mail_to = '6' ;
Can you guys help on this one.
SUBSTRINGmay lead towards wrong output in some particular cases likemail_to = 9,66,10