Yes, you can use alias to achieve this,
ref.
http://www.w3schools.com/SQL/sql_alias.aspfor example, table1, table 2
select table1.samefield as ts1 , table2.samefield as ts2
then you can select
$query = mysql_fetch_array($result)
;
$authorid = $query["ts1"];