Add: maestro log DB
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
|
||||
function insertMaestroLog($type, $maestro_id, $remark) {
|
||||
global $db_conn;
|
||||
|
||||
// echo("\n$type");
|
||||
// echo("\n$maestro_id");
|
||||
// echo("\n$remark");
|
||||
$query = "
|
||||
INSERT INTO maestro_log (Type, MaestroID, LogDateTime, Remark)
|
||||
VALUES (?, ?, NOW(), ?);
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
$stmt->bind_param('sis', $type, $maestro_id, $remark);
|
||||
$stmt->execute();
|
||||
|
||||
// echo "\ninsertMaestroLog";
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
function get_app_highest_record($maestro_id, $app_id, $player_id) {
|
||||
global $db_conn;
|
||||
|
||||
$query = "
|
||||
SELECT HighestRecord
|
||||
FROM app_highest_record
|
||||
WHERE MaestroID = ? AND AppID = ? AND PlayerID = ?;
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
$stmt->bind_param("iii", $maestro_id, $app_id, $player_id);
|
||||
$stmt->execute();
|
||||
$stmt->bind_result($app_highest_record);
|
||||
$stmt->fetch();
|
||||
$stmt->close();
|
||||
|
||||
return $app_highest_record;
|
||||
|
||||
// echo "\nget_app_highest_record : $app_highest_record";
|
||||
}
|
||||
|
||||
|
||||
function remove_app_highest_record($maestro_id, $app_id, $player_id) {
|
||||
global $db_conn;
|
||||
|
||||
$query = "
|
||||
DELETE FROM app_highest_record
|
||||
WHERE MaestroID = ? AND AppID = ? AND PlayerID = ?;
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
$stmt->bind_param("iii", $maestro_id, $app_id, $player_id);
|
||||
$stmt->execute();
|
||||
|
||||
// echo "\ndelete_app_highest_record";
|
||||
}
|
||||
|
||||
function insert_app_highest_record($maestro_id, $app_id, $player_id, $app_highest_record) {
|
||||
global $db_conn;
|
||||
|
||||
$query = "
|
||||
INSERT INTO app_highest_record (MaestroID, PlayerID, AppID, HighestRecord, RecordDateTime)
|
||||
VALUES (?, ?, ?, ?, NOW());
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
$stmt->bind_param('iiid', $maestro_id, $player_id, $app_id, $app_highest_record);
|
||||
$stmt->execute();
|
||||
|
||||
// echo "\ninsert_app_highest_record";
|
||||
}
|
||||
*/
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user