Quote:
Originally Posted by schlottkej
|
I dont understand this error... The code is...
Code:
SELECT * FROM rank_events AS rank_events
LEFT JOIN rank_games AS rank_games USING(gameID)
LEFT JOIN rank_categories AS rank_categories USING(categoryID)
ORDER BY eDate DESC
LIMIT 0, 30;
The error you are getting is:
Unknown column 'thematfo_forum.rank_games.categoryID' in 'on clause'
This line of code should be joining rank_events with rank_games using gameID, and then joining rank_events with rank_categories using categoryID. For some reason, the script is trying to join rank_games (instead of rank_events) with rank_categories using categoryID; which wont work. Why this is only happening on YOUR server, and no one elses... confuses me. Try replacing the following code in ranking.php:
Code:
$result = $vbulletin->db->query_read("SELECT * FROM ".TABLE_PREFIX."rank_events AS rank_events
LEFT JOIN ".TABLE_PREFIX."rank_games AS rank_games USING(gameID)
LEFT JOIN ".TABLE_PREFIX."rank_categories AS rank_categories USING(categoryID)
ORDER BY $sort $order
LIMIT ".($limitlower - 1).", $perpage
");
with...
Code:
$result = $vbulletin->db->query_read("SELECT * FROM ".TABLE_PREFIX."rank_events AS rank_events
LEFT JOIN ".TABLE_PREFIX."rank_games AS rank_games ON rank_events.gameID = rank_games.gameID
LEFT JOIN ".TABLE_PREFIX."rank_categories AS rank_categories ON rank_events.categoryID = rank_category.categoryID
ORDER BY $sort $order
LIMIT ".($limitlower - 1).", $perpage
");