MYSQL: 4.0.24
PHP: 4.3.11
This is a code from A-Mod, but doesn't see like no one really cares..so thought I'll post it here and maybe I'll get some help. When I'm on activity.php and click next page I get the following error:
Couldn't obtain game data
DEBUG MODE
SQL Error : 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 '' at line 5
SELECT * FROM phpbb_ina_games ORDER BY
Line : 749
File : activity.php
Lines 748 and 749:
748 if (!$result = $db->sql_query($sql) )
749 message_die(GENERAL_ERROR, $lang['no_game_data'], "",
Lines 724-252:
if ($where_clause)
{
$extra_where = "AND cat_id = '". $cat ."'";
$new_orderby = "ORDER BY ". $admin_d;
}
else
{
$extra_where = "WHERE cat_id = '". $cat ."'";
$new_orderby = "ORDER BY ". $admin_d;
}
}
else
{
$extra_where = '';
$new_orderby = 'ORDER BY '. $order_by;
}
$sql = "SELECT *
FROM ". iNA_GAMES ."
$where_clause
$extra_where
$new_orderby";
if (!$result = $db->sql_query($sql) )
message_die(GENERAL_ERROR, $lang['no_game_data'], "", __LINE__, __FILE__, $sql);
$game_count = $db->sql_numrows($result);
$game_rows = $db->sql_fetchrowset($result);
Any help will do thanks a lot.