Guest User

Untitled

a guest
Apr 23rd, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. SELECT t.seeders, t.banned, t.leechers, t.info_hash, t.filename, t.bitrate, t.series, t.audiotype, t.editedby, t.editmod, LENGTH( t.nfo ) AS nfosz, UNIX_TIMESTAMP( ) - UNIX_TIMESTAMP( t.last_action ) AS lastseed, t.numratings, t.name, t.description, IF( t.numratings < 1, NULL , ROUND( t.ratingsum / t.numratings, 1 ) ) AS rating, t.owner, t.save_as, t.descr, t.visible, t.size, t.added, t.views, t.hits, t.times_completed, t.id, t.type, t.numfiles, t.poster, c.name AS cat_name, u.username, GROUP_CONCAT( n.narratorname ORDER BY n.narratorname ) narrators, GROUP_CONCAT( au.authorname ORDER BY au.authorname ) authors
  2. FROM torrents t
  3. LEFT JOIN categories c ON t.category = c.id
  4. LEFT JOIN users u ON t.owner = u.id
  5. LEFT JOIN torrentstonarrators tn ON t.id = tn.torrentid
  6. LEFT JOIN narrators n ON tn.narratorid = n.id
  7. LEFT JOIN torrentstoauthors ta ON t.id = ta.torrentid
  8. LEFT JOIN authors au ON ta.authorid = au.id
  9. WHERE t.id = 197
  10. GROUP BY t.id, t.seeders, t.banned, t.leechers, t.info_hash, t.filename, t.bitrate, t.series, t.audiotype, t.editedby, t.editmod, nfosz, lastseed, t.numratings, t.name, t.description, rating, t.owner, t.save_as, t.descr, t.visible, t.size, t.added, t.views, t.hits, t.times_completed, t.type, t.numfiles, t.poster, cat_name, u.username
Add Comment
Please, Sign In to add comment