my problem is i want to JSON_ENCODE the result of inner join query and the two columns i want to select have the same name so, the JSON object override one of them and carry only data for one column cause they have the same name,,this is my code till now.
$query = "select faculty.NAME,sector.NAME from faculty inner join sector
on faculty.SECTOR_ID=sector.ID";
$result = mysql_query($query);
while($r = mysql_fetch_assoc($result)) {
$rows[] = $r;
}
echo json_encode($rows);
how to do this without change the column name in the DataBase...