I need a mysql query to get product's category name. I'm using this one but as you may see it doesn't retrieve category name. How can I get category name of a product in the query below?Thanks.
Code: Select all
SELECT * FROM product p, product_description pd, product_to_category pc WHERE p.product_id=pd.product_id AND pd.product_id=pc.product_id $price = $row['price']; $image = $row['image']; $weight = $row['weight'];