Star wars episode 29
- Date added:2017-10-11 00:00:00
- Title:Star wars episode 29
- Category:401
- Page:
select * from ( Select case when sas.Number_of_comments is null then 0 else sas.Number_of_comments end as Num_of_inline ,case when sas.Number_of_like is null then 0 else sas.Number_of_like end as Num_of_like ,case when sas.Number_of_dislike is null then 0 else sas.Number_of_dislike end as Num_of_dislike ,case when sas.Number_of_ranks is null then 0 else sas.Number_of_ranks end as Num_of_ranks ,case when sas.Number_of_tags is null then 0 else sas.Number_of_tags end as Num_of_tags ,case when sas.Number_of_views is null then 0 else sas.Number_of_views end as Num_of_views ,v1.Rel_assoc_ID , v1.Rel_assoc_area , 'eb' as 't' ,v1.ID ,v1.Expiry_date , v1.Comment ,v1.Title , v1.Visible ,v1.View_authority ,v1.Rel_user_ID ,v1.Rel_want_user_ID ,v1.Date_added ,v1.Rel_user_ab_ID ,kcm.User_Name ,kcm.User_online_status ,kcm.User_status_message ,kcm.File_ID ,kcm.User_last_log_timestamp , case when v1.View_authority = 3 and v1.Rel_user_ID =0 then 1 when v1.View_authority = 3 and not kcupl.ID is null and kcuplb.ID is null then 1 when v1.View_authority = 3 and not xlt.ID is null and kcuplb.ID is null then 1 when kcusr.View_authority = 3 and not kcupl.ID is null and kcuplb.ID is null then 1 when kcusr.View_authority = 3 and not xlt.ID is null and kcuplb.ID is null then 1 when v1.View_authority = 2 and kcuplb.ID is null and v1.Rel_user_ID =0 then 1 when v1.View_authority = 2 and not kcupl.ID is null and kcuplb.ID is null then 1 when v1.View_authority = 2 and not xlt.ID is null and kcuplb.ID is null then 1 when v1.View_authority = 2 and not kcuplf.ID is null and v1.Visible = 1 and kcuplb.ID is null then 1 when kcusr.View_authority = 2 and not kcupl.ID is null and kcuplb.ID is null then 1 when kcusr.View_authority = 2 and not xlt.ID is null and kcuplb.ID is null then 1 when kcusr.View_authority = 2 and not kcuplf.ID is null and kcuplb.ID is null then 1 when ( (v1.View_authority = 1 and v1.Visible = 1) or (v1.View_authority = 0 and v1.Visible = 1) ) and kcuplb.ID is null then 1 when ( v1.Rel_user_ID =0 ) and kcuplb.ID is null then 1 when ( kcusr.View_authority = 1 or kcusr.View_authority = 0 ) and kcuplb.ID is null then 1 else 0 end as ShowMatch , case when v1.Rel_user_ID =0 then 1 when not kcupl.ID is null and kcupl.Link_status > 0 then 1 when not xlt.ID is null and xlt.Link_status > 0 then 1 else 0 end as isContributor , case when v1.Rel_user_ID =0 then 1 when not kcupl.ID is null and kcupl.Link_status > 1 then 1 when not xlt.ID is null and xlt.Link_status > 1 then 1 else 0 end as isEditor from Stream v1 left join StreamActivityStats sas on sas.Content_ID = v1.ID and sas.Content_Area = 'Stream' left join kcmember kcm on kcm.ID = v1.Rel_user_ID left join xlinks kcupl on kcupl.ParentID = kcm.ID and kcupl.ChildID = 0 and kcupl.Rel_code = 'DELEGATE_ACCEPTED' left join xlinks kcuplf on kcuplf.ParentID = kcm.ID and kcuplf.ParentArea = 'SPUser' and kcuplf.ChildArea = 'SPUser' and kcuplf.ChildID = 0 and kcuplf.Rel_code = 'FRIEND_ACCEPTED' left join xlinks kcuplb on kcuplb.ParentID = kcm.ID and kcuplb.ParentArea = 'SPUser' and kcuplb.ChildArea = 'SPUser' and kcuplb.ChildID = 0 and kcuplb.Rel_code like '%_BLOCKED' left join xlinks xlt on xlt.ParentArea='Group' and xlt.ChildArea='SPUser' and xlt.ParentID = kcm.ID and xlt.ChildID = 0 and xlt.Link_status > 0 left join xlinks xlsr on xlsr.ParentID = kcm.ID and xlsr.ParentArea = 'SPUser' and xlsr.ChildArea = 'SecRight' and xlsr.DEFID = 40 left join kcusersecrights kcusr on kcusr.ID = xlsr.ChildID and xlsr.ParentArea = 'SPUser' WHERE v1.Rel_user_ID = 3 and v1.Rel_assoc_ID = 30 and v1.Rel_assoc_area = 'Page' and v1.Url = '' order by v1.ID desc LIMIT 0 ,40 ) t1 where t1.ShowMatch = 1 order by t1.ID desc

