[php]
global $team;
$team = $_GET[‘team’];
if(is_null($team)){
$team = “senior”;
}
$stmt = ‘SELECT * FROM players WHERE current = 1 AND team = “senior”‘;
global $senior_players;
$senior_players = $wpdb->get_results(‘SELECT * FROM players WHERE current = 1 AND team = “senior” ORDER BY squadno’);
$stmt = ‘SELECT * FROM players WHERE current = 1 AND team = “under18″‘;
global $youth_players;
$youth_players = $wpdb->get_results(‘SELECT * FROM players WHERE current = 1 AND team = “under18” ORDER BY squadno’);
[/php]
global $senior_players;
global $pid;
$pid = $_GET[‘pid’];
if(is_null($pid)){
$pid = $senior_players[0]->pid;
}
global $player;
$player = $wpdb->get_row( $wpdb->prepare( ‘SELECT * FROM players WHERE pid = %d’, $pid) );
echo $player->name;
[/php]
Position: [php]global $player; echo $player->position;[/php]
Joined: [php]global $player; echo $player->joined;[/php]
Senior Debut: [php]global $player; echo $player->senior_debut;[/php]
Previous Clubs: [php]global $player; echo $player->prevclubs;[/php]
[php]include(“senior-stats.php”);[/php]