diff options
author | Bot <bot@myigel.name> | 2017-01-02 15:43:36 +0100 |
---|---|---|
committer | Igor Scheller <igor.scheller@igorshp.de> | 2017-01-02 15:49:53 +0100 |
commit | d71e7bbfad2f07f82df0c515608996d250fd4182 (patch) | |
tree | 5083a17b218c08b3a699a0bf15bec926cc2dd185 /includes/model/ShiftTypes_model.php | |
parent | 7313e15ce8236e19331fb6639a3a5b97c8f06ecd (diff) |
Formatting
Diffstat (limited to 'includes/model/ShiftTypes_model.php')
-rw-r--r-- | includes/model/ShiftTypes_model.php | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/includes/model/ShiftTypes_model.php b/includes/model/ShiftTypes_model.php index fb361db9..8b1d56b8 100644 --- a/includes/model/ShiftTypes_model.php +++ b/includes/model/ShiftTypes_model.php @@ -2,6 +2,7 @@ /** * Delete a shift type. + * * @param int $shifttype_id */ function ShiftType_delete($shifttype_id) @@ -12,34 +13,38 @@ function ShiftType_delete($shifttype_id) /** * Update a shift type. * - * @param int $shifttype_id + * @param int $shifttype_id * @param string $name - * @param int $angeltype_id + * @param int $angeltype_id * @param string $description */ function ShiftType_update($shifttype_id, $name, $angeltype_id, $description) { - return sql_query("UPDATE `ShiftTypes` SET + return sql_query(" + UPDATE `ShiftTypes` SET `name`='" . sql_escape($name) . "', `angeltype_id`=" . sql_null($angeltype_id) . ", `description`='" . sql_escape($description) . "' - WHERE `id`='" . sql_escape($shifttype_id) . "'"); + WHERE `id`='" . sql_escape($shifttype_id) . "' + "); } /** * Create a shift type. * * @param string $name - * @param int $angeltype_id + * @param int $angeltype_id * @param string $description * @return new shifttype id */ function ShiftType_create($name, $angeltype_id, $description) { - $result = sql_query("INSERT INTO `ShiftTypes` SET + $result = sql_query(" + INSERT INTO `ShiftTypes` SET `name`='" . sql_escape($name) . "', `angeltype_id`=" . sql_null($angeltype_id) . ", - `description`='" . sql_escape($description) . "'"); + `description`='" . sql_escape($description) . "' + "); if ($result === false) { return false; } |