Add: typing app list, activate/deactivate app
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
header('Content-Type: application/json');
|
||||
|
||||
$maestroID = $_POST["maestro_id"];
|
||||
$appID = $_POST["app_id"];
|
||||
|
||||
include "./../setup/connect_db.php";
|
||||
|
||||
|
||||
deactivate_app($maestroID, $appID);
|
||||
|
||||
$replyJSON["RESULT"] = "ok";
|
||||
echo json_encode($replyJSON, JSON_UNESCAPED_UNICODE);
|
||||
$db_conn->close();
|
||||
|
||||
|
||||
function deactivate_app($maestroID, $appID) {
|
||||
global $db_conn;
|
||||
|
||||
$query = "
|
||||
DELETE FROM moty_active_app
|
||||
WHERE MaestroID = ? AND AppID = ?;
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
$stmt->bind_param('ii', $maestroID, $appID);
|
||||
$stmt->execute();
|
||||
$stmt->bind_result();
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user