There is a table in which for each product there are several values.
Example table:
id | number | price 1 | 3 | 22.3 2 | 1 | 34.3 3 | 3 | 42.4 4 | 1 | 44.3 5 | 4 | 21.3
Now the request is:
SELECT * FROM table WHERE number IN (3,1,4)
You need to make a request for a sample of goods with a minimum price for each number
. As I understand it: you just need to do the sorting from minimum to maximum and put a limit on each number
.
We use : MYSQL, PHP + CI3.