I have a product table with a product name, two product attribute fields and a price field.
The problem is that I cannot change the way the database is structured. Each attribute field is equivalent and can be used.
primarily:
NAME | ATTRIBUTE_1 | ATTRIBUTE_2 | PRICE
Tshirt | red | small | 25
Tshirt | medium | red | 20
Tshirt | blue | medium | 30
Tshirt | blue | large | 16
Not the best mood, but how is it ...
I want to make a request that will do the following:
Show all blue t-shirts and order them at a price Show all other t-shirts ordered at a price after
I was thinking of something like field order, but since the color can be either in attribute 1 or in 2, these fields should be equivalent.
Any suggestions?
Enkay source
share