Add: Maestro AccoutType 0 = experience account

This commit is contained in:
2018-08-10 07:14:05 +09:00
parent be02c06f3d
commit ade28a3334
4 changed files with 38 additions and 5 deletions
@@ -5,7 +5,7 @@ include "./../lib/send_reply_json.php";
include "./../setup/connect_db.php";
$maestro_experience_id = get_maestro_experience_id("test");
$maestro_experience_id = get_maestro_experience_id();
if($maestro_experience_id === null) {
set_error_message("등록된 마에스트로 관리자 계정이 없습니다.");
send_result_fail();
@@ -33,16 +33,16 @@ send_result_success();
exit;
function get_maestro_experience_id($maestro_name) {
function get_maestro_experience_id() {
global $db_conn;
$query = "
SELECT MaestroID
FROM moty_maestro
WHERE Name = ?
WHERE AccountType = 0
";
$stmt = $db_conn->prepare($query);
$stmt->bind_param("s", $maestro_name);
// $stmt->bind_param("s", $maestro_name);
$stmt->execute();
$stmt->bind_result($maestro_experience_id);
// while($stmt->fetch()) {