Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- z_screenshots.guid,
- z_screenshots.player_name,
- z_screenshots.server,
- z_screenshots.map,
- z_screenshots.created,
- z_screenshots.uploaded,
- z_screenshots.uploader_id,
- z_screenshots.filesize
- FROM z_screenshots
- INNER JOIN (
- SELECT clients.guid
- FROM clients WHERE clients.id NOT IN (
- SELECT clients.id
- FROM clients
- INNER JOIN (
- SELECT client_id
- FROM penalties
- WHERE (penalties.type = 'Ban' AND penalties.inactive = 0)
- UNION
- SELECT client_id FROM penalties
- WHERE (penalties.type = 'TempBan' AND penalties.inactive = 0 AND FROM_UNIXTIME(penalties.time_expire) > NOW())
- GROUP BY penalties.client_id
- ) penalties
- ON clients.id = penalties.client_id
- )
- ) clients
- ON z_screenshots.guid = clients.guid
- ORDER BY z_screenshots.uploaded DESC;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement