I have two tables in mysql: atributes and options.
Atributes
Id
Atribute
Options
Id
Idtribute
Option
Example atributes:
1, Size
2, Color
3, other
4, n...
Example options:
1, 1, S
2, 1, L
3, 1, M
4, 2, Red
5, 2, Green
6, 3, One
7, 3, Two
8, 3, Three
9, n, m
I want an string output like that:
S, Red, One
S, Red, Two
S, Red, Three
S, Green, One
S, Green, two
S, Green, three
L, Red, One
L, Red, Two
L, Red, Three
L, Green, One
S, Green, two
S, Green, three
etc.
I have tried with recursive functions, but I have not been able to do it. Somebody could help me? thx