Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- SQL_CALC_FOUND_ROWS gs.gallery_id,
- gs.thumb_id,
- gi.sponsor_id,
- gi.content_count,
- gi.content_type,
- gs.total_shows,
- gs.total_clicks,
- gs.total_ctr,
- gt.thumb_url,
- gd.*,
- gi.content_count,
- gi.crop_profile_id,
- gs.activation_date,
- gi.added_date,
- gi.duration,
- gi.url,
- gi.gallery_total_shows,
- gi.sponsor_id,
- gi.source_url,
- gi.custom_gallery
- FROM
- rot_gallery_stats1 AS gs
- JOIN
- rot_gallery_info AS gi
- ON gi.gallery_id = gs.gallery_id
- JOIN
- rot_gallery_data15 AS gd
- ON gd.gallery_id = gs.gallery_id
- JOIN
- rot_gal2tag
- ON rot_gal2tag.gallery_id = gs.gallery_id
- JOIN
- rot_thumbs AS gt
- ON gt.thumb_id = gs.thumb_id
- WHERE
- 1 = 1
- AND gi.gallery_status = 'active'
- AND gi.gallery_type = 0
- AND gs.best_thumb = 'yes'
- AND gi.sponsor_id NOT IN (
- 3
- )
- AND gs.group_id = 0
- AND EXISTS (
- SELECT
- 1
- FROM
- rot_gal2tag
- WHERE
- (
- rot_gal2tag.tag_id IN (
- 4755
- )
- )
- AND (
- gs.gallery_id = rot_gal2tag.gallery_id
- )
- )
- GROUP BY
- gs.gallery_id,
- gs.thumb_id
- ORDER BY
- gs.tested_thumb DESC,
- gs.total_ctr DESC LIMIT 60,
- 60
Advertisement
Add Comment
Please, Sign In to add comment