Hello,
I've 2 tables with the following structure :
Table 1 name : categories
Fields : id, code, name.
Table 2 name : Products
Fields : id, category_id, code, name
and here's MySQL query :
$query="SELECT *
FROM products
INNER JOIN categories
ON products.categpry_id = categories.id";
$result = mysql_query($query);
$row = mysql_fetch_array($result);
Now, I've the problem with "echo ()" !!
when I make :
echo $row[name];
it shows the name of product, how can I show the category name ??
I tried
echo $row[categories.name];
but I'm having errors !!
so how can I handle this ??
THANK YOU FOR YOUR TIME !