|
Register and log in to move these advertisements down
Items
Help
1064 | You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') )
ORDER BY
Trashed DESC, Visible ASC, Type ASC, Category ASC, Item' at line 27 | |
SELECT
Items.ID AS AID,
Items.Type AS Type,
Items.Author AS UID,
Items.Title AS Title,
Items.Summary AS Description,
Users.Name AS Author,
UNIX_TIMESTAMP(Items.Created) AS Created,
UNIX_TIMESTAMP(Items.Updated) AS Updated,
UNIX_TIMESTAMP(Items.LastComment) AS LastComment,
Items.Rating AS Rating,
Items.Votes AS Votes,
Items.Category AS CID,
Categories.Name AS Category,
Items.Level AS Level,
GROUP_CONCAT(
Games.ID ORDER BY Games.ID ASC SEPARATOR ';'
) AS Games,
GROUP_CONCAT(
Games.Name ORDER BY Games.ID ASC SEPARATOR ';'
) AS GameNames,
COUNT(ItemGames.Game) AS GamesCount,
Items.Trashed AS Trashed,
Items.Visible AS Visible
FROM
Items LEFT JOIN ItemGames ON
(ItemGames.Item = Items.ID)
LEFT JOIN Games ON
(ItemGames.Game = Games.ID)
LEFT JOIN Categories ON
(Items.Category = Categories.ID)
LEFT JOIN Users ON
(Users.ID = Items.Author)
WHERE
Items.Trashed = FALSE AND Items.Visible = TRUE
GROUP BY
AID, Type, UID, Title, Description, Author, Created, Updated, LastComment, Rating, Votes, CID, Category, Level, Trashed, Visible
HAVING Items.ID IN (SELECT Item FROM ItemGames WHERE Game IN () )
ORDER BY
Trashed DESC, Visible ASC, Type ASC, Category ASC, Items.Created DESC, Items.Updated DESC |
There are no items fulfilling the requirements.
Go to top
|
|
|
"One site to rule them all, one site to find them, one site to host them all, and on the network bind them."
© All Rights Reserved Eric Edwards ©2013.
Website programming by Bart van Heukelom, design by Clément Roy.
BFME, Battle For Middle Earth, and all assumed entities associated with them are © EA Games.
|
|