I have a two tables, one holds product infomation and the other holds the pricing options.
products - holds product name, description etc
prod_versions - holds product price options
here's what i'm using:
$newprod = mysql_query("SELECT DISTINCT ver_prod, prod_name, product_id, prod_short_desc, ver_price FROM prod_versions INNER JOIN products ON prod_versions.ver_prod = products.product_id ORDER BY date_added DESC LIMIT 9");
and the problem is, I am trying to select one of each product, and the least price, since some products have several pricing options, i get some products listed twice or even three times, depending on how many price options are in the "prod_versions" table.
I just want it to list the product once and select the lowest price option.
I want to List as follows
<? echo $r[prod_name]." - Priced From £".number_format($r[ver_price]); ?>