select * from books join authors on books.author_id=authors.id
Now you get the fields from each table in your result matched up correctly.
select * from books join authors on books.author_id=authors.id
Now you get the fields from each table in your result matched up correctly.