SELECT xxx.id as postid,
xxx.title as title,
xxx.description as description,
xxx.recepient_id as recepient,
xxx.vote as vote,
yyy.id as userid,
yyy.sml_picture as smallpix,
yyy.username as username,
zzz.name as category,
aaa.name as relationship,
yyy2.username as rec_name,
yyy2.sml_picture as rec_img,
xxx.date as date
FROM xxx
LEFT JOIN yyy
ON yyy.id = xxx.user
LEFT JOIN zzz
ON zzz.id = xxx.channel
LEFT join aaa
ON aaa.id = xxx.relationship
LEFT join yyy as yyy2
ON xxx.recepient_id = yyy2.id
WHERE xxx.active = 1
ORDER BY xxx.date desc
You think my sql is too long? is it okay to have query this long for CI?
