It does what the SQL I posted does… it returns a list of author information by joining two tables.
Your example does a lot of extra work by doing the JOIN one record at a time
While mine does it the correct way by using the power of SQL
If you do not understand SQL then THAT is where I would suggest your start your research.
It gets a list of articles, and a list of authors.
Work through every article one by one.
Every time you get a new article, look through all of the authors and if you find a match, print the result
It wastes time looking at all the authors, even if it has found a match.
It wastes time by not joining the tables together in the way that Dave suggests.
But there may not be an author in the table for every article. The author may be duplicated, in which case you will get several printouts per article.
If you want all articles anyway…
select a.title, a/author_id, b.full_name
from blog_articles a, left outer join authors b
on a.author_id = b.author_id
where a.is_visible = 1
…Giving a full list of articles, and letting you choose whether to report on one that lacks an author, if you choose.