tags:

views:

41

answers:

2

Hi, I have a column in my table 'refer'(column) 'chart1'(table) with values 49,47,50 so on for each person Now I have to take these numbers and get details of users with 49,47,50 in other table 'users'

users(table)

Name  id  address
xxx   49   bnm
yyy   47   kjh
zzz   50   jhg

chart1(table)

Name  refer     accounts
aaa   49,50      12547
bbb   47,49,50   32546

Now I need to get the details of 'xxx' 'yyy' 'zzz' accordingly by the refer column

+1  A: 

Well, if you can, change your database schema. :)

If not, you will have to split the column "refer", see MySQL Split String Function.

toobb
A: 

Hi, Thank you for replying, I saw the example in Split String Function but could not analyze how it fits my problem. Please help me out I am new to this type of query

vyjayanth