Hi,
I have two sql tables which i have joined using JOIN.
The tables and fields of each :
Items
id, name, price
Presents
id, name, type
the select statement is:
$sql = "SELECT
*
FROM
items
JOIN
presents
ON
items.name=presents.name ORDER BY items.id ASC";
$present_type = mysql_query($sql)or die(mysql_error());
now i have used following mysql_fetch_assoc:
$row = mysql_fetch_assoc($present_type)
When i do $row['id']; I get the id from presents table but i want to fetch the id from the items table, do i use $row['items.id']; ??
I think i may be wrong, can somebody please help me.
Thanks in advance for any help.