I have products in my database and to make this a little simpler I have the following columns
upn|parent_upn|name|description|web_price
What I want is to be able to display "Price from - £29 to £299"
The following doesn't work because it doesn't select the parent product price because the JOIN on PARENT is empty on the main product.
//Product Price List
SELECT MIN(web_price), MAX(web_price) FROM pi
INNER JOIN pi ON pi.upn = pi.parent_upn
WHERE pi.parent_upn = '$currentupn'
So here's the problem. when I use this it only gives me the min and max prices from the slave products.
I need it to also select the parent product.
Does anyone have any ideas? I'm not too good at database coding so thans to anyone who can help.