Fix: DB jisangs -> moty
This commit is contained in:
@@ -57,7 +57,7 @@ function has_player_name($maestroID, $playerName, $enterCode) {
|
||||
|
||||
$query = "
|
||||
SELECT PlayerID
|
||||
FROM moty_player
|
||||
FROM player
|
||||
WHERE MaestroID = ? AND Name = ? AND EnterCode = ?
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
@@ -76,7 +76,7 @@ function get_maestro_account_type($maestroID) {
|
||||
|
||||
$query = "
|
||||
SELECT AccountType
|
||||
FROM moty_maestro
|
||||
FROM maestro
|
||||
WHERE MaestroID = ?
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
@@ -95,7 +95,7 @@ function get_player_count($maestroID) {
|
||||
|
||||
$query = "
|
||||
SELECT PlayerCount
|
||||
FROM moty_maestro
|
||||
FROM maestro
|
||||
WHERE MaestroID = ?
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
@@ -113,7 +113,7 @@ function add_player($maestroID, $playerName, $enterCode) {
|
||||
global $db_conn;
|
||||
|
||||
$query = "
|
||||
INSERT INTO moty_player (MaestroID, Name, EnterCode)
|
||||
INSERT INTO player (MaestroID, Name, EnterCode)
|
||||
VALUES (?, ?, ?)
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
@@ -125,7 +125,7 @@ function increase_player_count($maestroID, $count) {
|
||||
global $db_conn;
|
||||
|
||||
$query = "
|
||||
UPDATE moty_maestro
|
||||
UPDATE maestro
|
||||
SET PlayerCount = PlayerCount + ?
|
||||
WHERE MaestroID = ?
|
||||
";
|
||||
@@ -139,7 +139,7 @@ function count_registered_player($maestroID) {
|
||||
|
||||
$query = "
|
||||
SELECT COUNT(PlayerID)
|
||||
FROM moty_player
|
||||
FROM player
|
||||
WHERE MaestroID = ? AND AccountType = 0
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
@@ -157,7 +157,7 @@ function update_count_registered_player($maestroID, $countPlayer) {
|
||||
global $db_conn;
|
||||
|
||||
$query = "
|
||||
UPDATE moty_maestro
|
||||
UPDATE maestro
|
||||
SET PlayerCount = ?
|
||||
WHERE MaestroID = ?
|
||||
";
|
||||
|
||||
@@ -37,7 +37,7 @@ function deletePlayer($maestroID, $playerID) {
|
||||
global $db_conn;
|
||||
|
||||
$query = "
|
||||
DELETE FROM moty_best_record
|
||||
DELETE FROM best_record
|
||||
WHERE MaestroID = ? AND PlayerID = ?
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
@@ -50,7 +50,7 @@ function deletePlayer($maestroID, $playerID) {
|
||||
// }
|
||||
|
||||
$query = "
|
||||
DELETE FROM moty_player
|
||||
DELETE FROM player
|
||||
WHERE MaestroID = ? AND PlayerID = ?
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
@@ -68,7 +68,7 @@ function countPlayerID($maestroID, $playerID) {
|
||||
|
||||
$query = "
|
||||
SELECT COUNT(PlayerID)
|
||||
FROM moty_player
|
||||
FROM player
|
||||
WHERE MaestroID = ? AND PlayerID = ?
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
@@ -87,7 +87,7 @@ function countPlayerRecord($maestroID, $playerID) {
|
||||
|
||||
$query = "
|
||||
SELECT COUNT(PlayerID)
|
||||
FROM moty_best_record
|
||||
FROM best_record
|
||||
WHERE MaestroID = ? AND PlayerID = ?
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
@@ -105,7 +105,7 @@ function decrease_player_count($maestroID, $count) {
|
||||
global $db_conn;
|
||||
|
||||
$query = "
|
||||
UPDATE moty_maestro
|
||||
UPDATE maestro
|
||||
SET PlayerCount = PlayerCount - ?
|
||||
WHERE MaestroID = ?
|
||||
";
|
||||
@@ -119,7 +119,7 @@ function count_registered_player($maestroID) {
|
||||
|
||||
$query = "
|
||||
SELECT COUNT(PlayerID)
|
||||
FROM moty_player
|
||||
FROM player
|
||||
WHERE MaestroID = ? AND AccountType = 0
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
@@ -137,7 +137,7 @@ function update_count_registered_player($maestroID, $countPlayer) {
|
||||
global $db_conn;
|
||||
|
||||
$query = "
|
||||
UPDATE moty_maestro
|
||||
UPDATE maestro
|
||||
SET PlayerCount = ?
|
||||
WHERE MaestroID = ?
|
||||
";
|
||||
|
||||
@@ -42,7 +42,7 @@ exit;
|
||||
function hasSamePlayerData($maestroID, $playerID, $playerName, $enterCode) {
|
||||
global $db_conn;
|
||||
|
||||
$query = "SELECT COUNT(PlayerID) FROM moty_player WHERE MaestroID=? AND PlayerID<>? AND Name=? AND EnterCode=?";
|
||||
$query = "SELECT COUNT(PlayerID) FROM player WHERE MaestroID=? AND PlayerID<>? AND Name=? AND EnterCode=?";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
$stmt->bind_param("iiss", $maestroID, $playerID, $playerName, $enterCode);
|
||||
$stmt->execute();
|
||||
@@ -57,7 +57,7 @@ function hasSamePlayerData($maestroID, $playerID, $playerName, $enterCode) {
|
||||
function editPlayer($maestroID, $playerID, $playerName, $enterCode) {
|
||||
global $db_conn;
|
||||
|
||||
$query = "UPDATE moty_player SET Name=?, EnterCode=? WHERE MaestroID=? AND PlayerID=?";
|
||||
$query = "UPDATE player SET Name=?, EnterCode=? WHERE MaestroID=? AND PlayerID=?";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
$stmt->bind_param("ssii", $playerName, $enterCode, $maestroID, $playerID);
|
||||
$stmt->execute();
|
||||
@@ -66,7 +66,7 @@ function editPlayer($maestroID, $playerID, $playerName, $enterCode) {
|
||||
function hasPlayerName($maestroID, $playerName, $enterCode) {
|
||||
global $db_conn;
|
||||
|
||||
$query = "SELECT PlayerID FROM moty_player WHERE MaestroID=? AND Name=? AND EnterCode=?";
|
||||
$query = "SELECT PlayerID FROM player WHERE MaestroID=? AND Name=? AND EnterCode=?";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
$stmt->bind_param("iss", $maestroID, $playerName, $enterCode);
|
||||
$stmt->execute();
|
||||
|
||||
@@ -44,7 +44,7 @@ function get_maestro_id($maestroName) {
|
||||
|
||||
$query = "
|
||||
SELECT MaestroID, AccountType
|
||||
FROM moty_maestro
|
||||
FROM maestro
|
||||
WHERE Name = ?
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
@@ -67,7 +67,7 @@ function get_login_data($maestroID, $name, $enterCode) {
|
||||
|
||||
$query = "
|
||||
SELECT PlayerID, AccountType
|
||||
FROM moty_player
|
||||
FROM player
|
||||
WHERE MaestroID = ? AND Name = ? AND EnterCode = ?
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
|
||||
@@ -30,7 +30,7 @@ function get_experience_maestro_info() {
|
||||
|
||||
$query = "
|
||||
SELECT MaestroID, MaestroTestID
|
||||
FROM moty_maestro
|
||||
FROM maestro
|
||||
WHERE AccountType = 100
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
@@ -53,7 +53,7 @@ function get_maestro_test_player_info($maestro_id) {
|
||||
|
||||
$query = "
|
||||
SELECT PlayerID, Name, AccountType
|
||||
FROM moty_player
|
||||
FROM player
|
||||
WHERE MaestroID = ?
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
|
||||
@@ -24,7 +24,7 @@ function getPlayerCount($maestroID) {
|
||||
|
||||
$query = "
|
||||
SELECT COUNT(PlayerID)
|
||||
FROM moty_player
|
||||
FROM player
|
||||
WHERE MaestroID = ? AND AccountType <> 1
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
|
||||
@@ -25,7 +25,7 @@ function get_player_list_page($maestroID, $startNo, $endNo) {
|
||||
global $db_conn;
|
||||
|
||||
$query = "
|
||||
SELECT PlayerID, Name, EnterCode FROM moty_player
|
||||
SELECT PlayerID, Name, EnterCode FROM player
|
||||
WHERE MaestroID = ? AND AccountType <> 1
|
||||
ORDER BY PlayerID DESC
|
||||
LIMIT ?, 10;
|
||||
|
||||
@@ -24,7 +24,7 @@ function getPlayerCount($maestroID, $playerName) {
|
||||
|
||||
$query = "
|
||||
SELECT COUNT(PlayerID)
|
||||
FROM moty_player
|
||||
FROM player
|
||||
WHERE MaestroID = ? AND AccountType <> 1 AND Name LIKE CONCAT('%', ?, '%')
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
|
||||
@@ -26,7 +26,7 @@ function get_player_list_page($maestroID, $playerName, $startNo, $endNo) {
|
||||
global $db_conn;
|
||||
|
||||
$query = "
|
||||
SELECT PlayerID, Name, EnterCode FROM moty_player
|
||||
SELECT PlayerID, Name, EnterCode FROM player
|
||||
WHERE MaestroID = ? AND AccountType <> 1 AND Name LIKE CONCAT('%', ?, '%')
|
||||
ORDER BY PlayerID DESC
|
||||
LIMIT ?, 10;
|
||||
|
||||
Reference in New Issue
Block a user