LEFT to INNER

This commit is contained in:
Howl 2016-08-19 23:48:44 +02:00
parent 817592e736
commit 69e1d585cc

View File

@ -34,8 +34,8 @@ func BlogPostsGET(md common.MethodData) common.CodeMessager {
u.id, u.username, s.username_aka, u.register_datetime, u.id, u.username, s.username_aka, u.register_datetime,
u.privileges, u.latest_activity, s.country u.privileges, u.latest_activity, s.country
FROM anchor_posts b FROM anchor_posts b
LEFT JOIN users u ON b.author = u.id INNER JOIN users u ON b.author = u.id
LEFT JOIN users_stats s ON b.author = s.id INNER JOIN users_stats s ON b.author = s.id
WHERE status = "published" `+and+` WHERE status = "published" `+and+`
ORDER BY b.id DESC `+common.Paginate(md.Query("p"), md.Query("l"), 50), params...) ORDER BY b.id DESC `+common.Paginate(md.Query("p"), md.Query("l"), 50), params...)
if err != nil { if err != nil {