Mysql Left Join Null Result
- by Ozzy
I have this query
SELECT articles.*,
users.username AS `user`
FROM `articles`
LEFT JOIN `users` ON articles.user_id = users.id
ORDER BY articles.timestamp
Basically it returns the list of articles and the username that the article is associated to. Now if there is no entry in the users table for a particular user id, the users var…