Need help retreiving data from a table
Posted: Fri Jun 08, 2007 6:12 am
Hi, I have table with the following data :
ID ProdID ExValID Content
18311 4677 1 19°
18312 4677 1 22°
18313 4677 1 25°
18314 4677 1 28°
18316 4677 2 R/H
18317 4677 2 L/H
18319 4677 4 Regular
18320 4677 4 Stiff/Firm
18321 4677 4 Light/Senior
The application of my query is more concerned with the last column; Content. I need to create a query which returns every combination of of values based on the Content column for a given prodID, so in the example above it should return something similar to :
ProdID
4677 R/H 19° Regular
4677 R/H 22° Regular
4677 R/H 25° Regular
4677 R/H 28° Regular
4677 R/H 19° Stiff/Firm
4677 R/H 22° Stiff/Firm
4677 R/H 25° Stff/Firm
4677 L/H 19° Regular
... and so on
Is this possible to acheive using a mysql query?
I've tried several things, but more guessing than any educated attempts, so anyone who can help shed some light on how to solve this would be really appreciated
Thanks
ID ProdID ExValID Content
18311 4677 1 19°
18312 4677 1 22°
18313 4677 1 25°
18314 4677 1 28°
18316 4677 2 R/H
18317 4677 2 L/H
18319 4677 4 Regular
18320 4677 4 Stiff/Firm
18321 4677 4 Light/Senior
The application of my query is more concerned with the last column; Content. I need to create a query which returns every combination of of values based on the Content column for a given prodID, so in the example above it should return something similar to :
ProdID
4677 R/H 19° Regular
4677 R/H 22° Regular
4677 R/H 25° Regular
4677 R/H 28° Regular
4677 R/H 19° Stiff/Firm
4677 R/H 22° Stiff/Firm
4677 R/H 25° Stff/Firm
4677 L/H 19° Regular
... and so on
Is this possible to acheive using a mysql query?
I've tried several things, but more guessing than any educated attempts, so anyone who can help shed some light on how to solve this would be really appreciated
Thanks