I am making a website that will sell shirts. A shirt might be one style but in many colours and sizes and prices.
Product is V neck shirt
Stock is S - Blue - $19.99, M - Green - $22.99, Large - White - $25.99 etc
I am going to have an image of the shirt with the name of the shirt under (V neck shirt) and then the price range under that ($19.99 to $25.99)
I haven't done this before and have been doing some research but am now stuck.
Here is my code so far:
I know that at the moment my lowest is 19.99 and highest is 109.00 but when I run this code I get lowest is 58.99 and highest is 100.00.
$content=mysql_query("SELECT MAX(price) AS max_price, MIN(price) AS min_price FROM shirts");
$content = mysql_fetch_array($content);
$max_price = $content['max_price'];
$min_price = $content['min_price'];
echo ("$min_price - $max_price");
What am I doing wrong?
Any help would be great.