|
@@ -49,17 +49,19 @@ class FEED {
|
49
|
49
|
if (!$Entries) {
|
50
|
50
|
require(SERVER_ROOT.'/classes/mysql.class.php');
|
51
|
51
|
$DB = NEW DB_MYSQL; //Load the database wrapper
|
52
|
|
-
|
53
|
52
|
$DB->query("
|
54
|
|
- SELECT t.*,
|
55
|
|
- (SELECT Name from artists_group ag WHERE ag.ArtistID=ta.ArtistID) AS ArtistName,
|
56
|
|
- tg.Name AS GroupName,
|
57
|
|
- tg.WikiBody AS WikiBody
|
58
|
|
- FROM `torrents` t
|
59
|
|
- LEFT JOIN torrents_artists ta ON t.GroupID=ta.GroupID
|
60
|
|
- LEFT JOIN torrents_group tg ON tg.ID=ta.GroupID
|
61
|
|
- ORDER BY ID DESC
|
62
|
|
- LIMIT 50");
|
|
53
|
+ SELECT * FROM (
|
|
54
|
+ SELECT t.*,
|
|
55
|
+ (SELECT Name from artists_group ag WHERE ag.ArtistID=ta.ArtistID) AS ArtistName,
|
|
56
|
+ tg.Name AS GroupName,
|
|
57
|
+ tg.WikiBody AS WikiBody
|
|
58
|
+ FROM `torrents` t
|
|
59
|
+ LEFT JOIN torrents_artists ta ON t.GroupID=ta.GroupID
|
|
60
|
+ LEFT JOIN torrents_group tg ON tg.ID=ta.GroupID
|
|
61
|
+ ORDER BY id DESC
|
|
62
|
+ LIMIT 20
|
|
63
|
+ ) sub
|
|
64
|
+ ORDER BY id ASC");
|
63
|
65
|
while ($torrent = $DB->next_record()) {
|
64
|
66
|
$Title = $torrent['ArtistName'].' - '.$torrent['GroupName'].' - '.$torrent['Recorded'].' | '.$torrent['Codec'].' / '.$torrent['Media'].' / '.$torrent['Container'].' / '.$torrent['Resolution'].' / '.$torrent['AudioFormat'];
|
65
|
67
|
|