I hope this is something you can help me with.
I have through much trial and error come up with this statement which lists everything neatly in my phpmyadmin view.
SELECT DISTINCT inzone_product_lang.name, inzone_product.price, (inzone_product.price * 1.25) as pris
FROM inzone_product_lang
INNER JOIN inzone_product
ON inzone_product.id_product=inzone_product_lang.id_product
ORDER BY inzone_product_lang.name, pris
I’d like to make this into a php query and print it – but I am stuck here.
$result = mysql_query("SELECT DISTINCT inzone_product_lang.name, inzone_product.price, (inzone_product.price * 1.25) as pris
FROM inzone_product_lang
INNER JOIN inzone_product
ON inzone_product.id_product=inzone_product_lang.id_product
ORDER BY inzone_product_lang.name, pris
LIMIT 0, 900
");
$data = mysql_fetch_object($result);
echo $data->foo();
1 Answer