<?php $query = mysql_query('SELECT * FROM threads INNER JOIN accounts ON threads.author = accounts.id WHERE id = '.intval($_GET['threadID'])); $row = mysql_fetch_assoc($query); $title = $row['title']; ?>
What if I have a column named the same in both tables? (title) How does it know which one to get? How can I tell it to get it from accounts table not threads without have different name on them.
You can use an alias to fetch the column with a different name
If you only want to fetch the accounts title, list the columns from threads that you DO want