I am trying to get a result by joining two tables . but i am not getting proper result . can any one tell where i am wrong ?
here is my code
$sql = "SELECT merchant.name, keyword.name
FROM keyword
INNER JOIN merchant
ON merchant.id=keyword.merchant_id";
And my table structurer is
keyword
1.name (keyword name)
2.merchant_id
merchant
1.id
2.name (merchant name)
the result sholud be like this
merchant name |||||| keyword name
and SQL fetch query is
while($row = mysql_fetch_array($retval, MYSQL_ASSOC))
{
echo "<tr><td>".$row['name']."</td><td>".$row['name']."</td>";
}
But the output is
keyword name |||||| keyword name
only i am getting keyword name
can any one tell me where i am wrong . (sorry for my bad English)