Welcome Guest, Not a member yet? Register   Sign In
Long query?
#1

[eluser]thachp[/eluser]
Code:
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?
#2

[eluser]Peter Ivanov[/eluser]
yes its OK i actualy use much longer qery than yours and it runs fine Smile see here
http://ellislab.com/forums/viewthread/53131/




Theme © iAndrew 2016 - Forum software by © MyBB