fetch_array($query, __LINE__, __FILE__); // get the list of other games for the list $query = " SELECT G.* , P1.p_username AS black_username , P2.p_username AS white_username FROM ".T_GAME." AS G LEFT JOIN ".T_PLAYER." AS P1 ON P1.p_id = G.g_black_player_id LEFT JOIN ".T_PLAYER." AS P2 ON P2.p_id = G.g_white_player_id WHERE ( g_white_player_id != '{$_SESSION['player_id']}' AND g_black_player_id != '{$_SESSION['player_id']}' ) AND ( g_status = 'Black' OR g_status = 'White' ) ORDER BY g_num_moves "; $other_games = $mysql->fetch_array($query, __LINE__, __FILE__); // get the list of finished games for the list $query = " SELECT G.* , P1.p_username AS black_username , P2.p_username AS white_username FROM ".T_GAME." AS G LEFT JOIN ".T_PLAYER." AS P1 ON P1.p_id = G.g_black_player_id LEFT JOIN ".T_PLAYER." AS P2 ON P2.p_id = G.g_white_player_id WHERE ( g_status != 'Black' AND g_status != 'White' ) ORDER BY g_last_move DESC "; $finished_games = $mysql->fetch_array($query, __LINE__, __FILE__); // start the page echo "\n"; ?>
Hello, . Please select one of your games from the list below.