the expired banneds players show in list too
how can i do?
Fatal error: Call to a member function fetchAll() on a non-object in D:\xampp\htdocs\pages\bans.php on line 13
[COLOR=#0000BB][FONT=monospace]$players_banned [/FONT][/COLOR][COLOR=#007700][FONT=monospace]= [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]$SQL[/FONT][/COLOR][COLOR=#007700][FONT=monospace]->[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]query[/FONT][/COLOR][COLOR=#007700][FONT=monospace]([/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]'SELECT `bans`.`value`, `bans`.`comment`, `bans`.`admin_id`, `bans`.`expires`, `bans`.`added`, `bans`.`reason` FROM `bans`, `players` WHERE `players`.`account_id` = `bans`.`value` AND `bans`.`type` = 3 AND `bans`.`active` = 1 GROUP BY `bans`.`value` ORDER BY `bans`.`expires`'[/FONT][/COLOR][COLOR=#007700][FONT=monospace])->[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]fetchAll[/FONT][/COLOR][COLOR=#007700][FONT=monospace]();
[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]$number_of_players [/FONT][/COLOR][COLOR=#007700][FONT=monospace]= [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]0[/FONT][/COLOR][COLOR=#007700][FONT=monospace];[/FONT][/COLOR]
$players_banned = $SQL->query('SELECT ' . $SQL->tableName('bans') . ' . ' . $SQL->fieldName('value') . ' , ' . $SQL->tableName('bans') . ' . ' . $SQL->fieldName('comment') . ' , ' . $SQL->tableName('bans') . ' . ' . $SQL->fieldName('admin_id') . ' , ' . $SQL->tableName('bans') . ' . ' . $SQL->fieldName('expires') . ' , ' . $SQL->tableName('bans') . ' . ' . $SQL->fieldName('added') . ' , ' . $SQL->tableName('bans') . ' . ' . $SQL->fieldName('vreason') . ' FROM ' . $SQL->tableName('bans') . ' . ' . $SQL->fieldName('players') . ' WHERE ' . $SQL->tableName('players') . ' . ' . $SQL->fieldName('account_id') . ' = ' . $SQL->tableName('bans') . ' . ' . $SQL->fieldName('value') . ' AND ' . $SQL->tableName('bans') . ' . ' . $SQL->fieldName('type') . ' = 3 AND ' . $SQL->tableName('bans') . ' . ' . $SQL->fieldName('active') . ' = 1 GROUP BY ' . $SQL->tableName('bans') . ' . ' . $SQL->fieldName('value') . ' ORDER BY ' . $SQL->tableName('bans') . ' . ' . $SQL->fieldName('added') . ' DESC')->fetchAll();