i'm working on mysql those are my tables
D
----------
id , name
----------
1 , d1
2 , d2
3 , d3
t
----------
id , name
----------
1 , t1
2 , t2
3 , t3
c
----------
id , d_id , t_id
----------
1 , 1 , 1
1 , 1 , 2
1 , 1 , 3
1 , 2 , 1
1 , 2 , 2
1 , 2 , 3
1 , 3 , 1
1 , 3 , 2
1 , 3 , 3
i want to produce a query to get result like this
-------------------------------------------
d.name , t.name , t.name , t.name
-------------------------------------------
d1 , t1 , t2 , t3
d2 , t1 , t2 , t3
d3 , t1 , t2 , t3
is that possible ?
Thanks
EDIT
if it's not possible, is there any idea on how to get it as an array or object using PHP ?