Say I have a products table of the following values
itemid itemname
1 shoes
2 shirt
3 hat
4 socks
5 umbrella
and a table of custom fields for each item with these values.
itemid fieldkey fieldvalue
1 color blue
2 color orange
2 size large
3 color red
4 size small
4 color blue
1 size 12mens
Could I write a single mysql query to show custom field values as columns for each item?
So that I can have a list of products and their respective sizes and colors e.g.
itemid itemname color size
1 Shoes blue 12mens
1
something like this perhaps?










Bookmarks