Fix: experience maestro account, experience_player_account
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
header("Content-Type: application/json");
|
||||
|
||||
include "./../lib/send_reply_json.php";
|
||||
include "./../setup/connect_db.php";
|
||||
|
||||
|
||||
$maestro_experience_id = get_maestro_experience_id("test");
|
||||
if($maestro_experience_id === null) {
|
||||
set_error_message("등록된 마에스트로 관리자 계정이 없습니다. (".$maestro_experience_id.")");
|
||||
send_result_fail();
|
||||
exit;
|
||||
}
|
||||
|
||||
set_data("maestroID", $maestro_experience_id);
|
||||
set_data("playerID", -1);
|
||||
set_data("playerName", "TestPlayer");
|
||||
send_result_success();
|
||||
exit;
|
||||
|
||||
|
||||
function get_maestro_experience_id($maestro_name) {
|
||||
global $db_conn;
|
||||
|
||||
$query = "
|
||||
SELECT MaestroID
|
||||
FROM moty_maestro
|
||||
WHERE Name = ?
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
$stmt->bind_param("s", $maestro_name);
|
||||
$stmt->execute();
|
||||
$stmt->bind_result($maestro_experience_id);
|
||||
// while($stmt->fetch()) {
|
||||
// ;
|
||||
// }
|
||||
$stmt->fetch();
|
||||
$stmt->close();
|
||||
|
||||
return $maestro_experience_id;
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user