<?php

function get_maestro_data($maestro_id) {
	global $db_conn;

	$query = "
		SELECT Name, Email, AccountType, ActivateStatus, AvailableActivateDateTime, PlayerCount, AcceptClausesDateTime, MaestroTestID
		FROM maestro
		WHERE MaestroID = ?
	";
	$stmt = $db_conn->prepare($query);
	$stmt->bind_param("i", $maestro_id);
	$stmt->execute();
	$stmt->bind_result($name, $email, $accountType, $activateStatus, $availableActivateDateTime, $playerCount, $acceptClausesDateTime, $maestroTestID);
	$stmt->fetch();
	$stmt->close();

	$maestro_data = array();
	$maestro_data['name'] = $name;
	$maestro_data['email'] = $email;
	$maestro_data['accountType'] = $accountType;
	$maestro_data['activateStatus'] = $activateStatus;
	$maestro_data['availableActivateDateTime'] = $availableActivateDateTime;
	$maestro_data['playerCount'] = $playerCount;
	$maestro_data['acceptClausesDateTime'] = $acceptClausesDateTime;
	$maestro_data['maestroTestID'] = $maestroTestID;

	return $maestro_data;
}

?>