How to fetch array values from mysql database

Dear All,

tbl_languages
lang_id    lang_known
1            Kannada
2             English
3             Hindi

tbl_user_reg
user_id              user_name              lang_id
101                     demo0                     1,2
102                     demo1                     1,3
103                    demo2                     1,2,3

I want to Show language name instead of ID I tried like this but it is not working…

SELECT * FROM tbl_user_reg
INNER JOIN tbl_languages ON tbl_user_reg.lang_id=tbl_languages.lang_id

My expected Output is :

ID: 101
Name: demo0
Language known: Kannada, English

But Above query is not working…
any suggestion please…

thanks,

5 posts were merged into an existing topic: How to search value from stored from as array to Database

Sponsor our Newsletter | Privacy Policy | Terms of Service