When I'm selecting from multiple tables that share column names is there a way I can return both, but define which one I want to select the data from?
For instance: Both tables contain "date" columns, and I want to use both, but I would like to avoid having to rename each column that has duplicate names.
$query = mysql_query("SELECT * FROM posts, comments"); //(SELECT * is just for example)
while($row=mysql_fetch_array($query))
{
$postDate = $row['date']; //I would like to be able to do something like:
//$postDate = $row['posts']['date']; OR $row['posts.date'];
//of course it's all in an array now, jumbled up.
$commentDate = $row['date'];
}