Hey there,
My sql statement looks like:
SELECT prod.*,cat.name FROM products prod,categories cat,product_category pc WHERE prod.id=3 AND pc.category_id = cat.id AND pc.product_id = prod.id
When I get everything into:
$line=mysql_fetch_array($result);
I simply use $line[id] or whatever to call each value. Just now I realized that the "products" and "categories" tables both have "name" fields... how can I differentiate between the two? $line[name] just gives me one value.
Thanks,
-dr
My sql statement looks like:
SELECT prod.*,cat.name FROM products prod,categories cat,product_category pc WHERE prod.id=3 AND pc.category_id = cat.id AND pc.product_id = prod.id
When I get everything into:
$line=mysql_fetch_array($result);
I simply use $line[id] or whatever to call each value. Just now I realized that the "products" and "categories" tables both have "name" fields... how can I differentiate between the two? $line[name] just gives me one value.
Thanks,
-dr