Add: maestro DB - AvailableActivateDateTime

This commit is contained in:
2018-07-19 10:57:04 +09:00
parent 0bf3adb4ed
commit c2f478c97f
5 changed files with 39 additions and 25 deletions
+5 -1
View File
@@ -7,7 +7,11 @@ include "./../setup/connect_db.php";
$maestro_id = $_POST["maestro_id"];
$query = "UPDATE moty_maestro SET ActivateStatus=1 WHERE MaestroID=?";
$query = "
UPDATE moty_maestro
SET ActivateStatus = 1, AvailableActivateDateTime = DATE_ADD(NOW(), INTERVAL 1 YEAR)
WHERE MaestroID = ?
";
$stmt = $db_conn->prepare($query);
$stmt->bind_param("i", $maestro_id);
$stmt->execute();
@@ -29,7 +29,8 @@ function get_maestro_list() {
global $db_conn;
$query = "
SELECT MaestroID, Name, AccountType FROM moty_maestro
SELECT MaestroID, Name, AccountType
FROM moty_maestro
WHERE ActivateStatus=0
ORDER BY MaestroID DESC
";
@@ -54,7 +55,8 @@ function get_maestro_list_by_name($maestroName) {
global $db_conn;
$query = "
SELECT MaestroID, Name, AccountType FROM moty_maestro
SELECT MaestroID, Name, AccountType
FROM moty_maestro
WHERE Name LIKE CONCAT('%', ?, '%') AND ActivateStatus=0
ORDER BY MaestroID DESC
";