mysql - Build complex result table with dynamic columns -


i have question - trying find solution here, see not situation. so:

in table1 have article descriptions

id  | name 1   | doors 2   | chairs 

in table2 have article properties

id  |id_article | descr 1   |1          | type 2   |1          | material 3   |2          | height 4   |2          | width 5   |2          | toll 

in table3 have article list properties values like

article | id_art_descr | id_art_prop | value model1  | 1            | 1           | solid model1  | 1            | 2           | wood model2  | 1            | 1           | solid model2  | 1            | 2           | steel 

the goal build table, list article given group properties group. example, doors, table must have columns:

article | type  | material model1  | solid | wood model2  | solid | steel 

for chairs, table must have other columns:

article | height | width | toll ........ 

so every article group, columns count , lables different. write script on aspx , php this, method have difficults sorting or filtering result table (in case, have more 10k ot rows). wonder there way generate result table on mysql?

and here sqlfiddle description table1, table2 , table3: http://sqlfiddle.com/#!2/53e32/1

thank strawberry


Comments

Popular posts from this blog

php - get table cell data from and place a copy in another table -

javascript - Mootools wait with Fx.Morph start -

php - Navigate throught databse rows -