Recursive call in mySQL -


i have data has 3 columns

+------+------+------+ | col1 | col2 | col3 | +------+------+------+ |    |  1   |  p   | |    |  3   |  q   | |  1   |  b   |  r   | |  1   |  c   |  s   | |  3   |  x   |  t   | |  b   |  l   |  u   | |  b   |  x   |  v   | |  c   |  t   |  w   | |  c   |  z   |  m   | +------+------+------+ 

column 1 entries can have more 1 value.

now if user searches 1 in table, returns values corresponding 1,

now entries corresponding b in column 1 should repeated , on.. if user searches 1 output should be

+------+------+ | col1 | col2 | +------+------+ |  1   |  b   | |  1   |  c   | |  3   |  x   | |  b   |  o   | |  b   |  x   | |  c   |  t   | |  c   |  z   | +------+------+ 

can me select query.?


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -