getInput(); // Check given Status if (!isset($input["status"])) { $api->answer(400, [ "error" => "missing_fields", "error_text" => "Some fields are missing" ], true); return; } if ($status !== 0 && $status !== 1 && $status !== 2) { $api->answer(400, [ "error" => "status_invalid", "error_text" => "The given status is invalid." ], true); } $command = "SELECT * FROM entrys WHERE status = :status"; $response = $api->dbCommand($command, true, true, [ ":status" => $status ]);