fix sql queries with bools

This commit is contained in:
msquare 2017-11-19 13:17:34 +01:00
parent 4779771d08
commit 88ea992f9c
3 changed files with 18 additions and 18 deletions

View File

@ -152,10 +152,10 @@ function AngelType_create($angeltype)
',
[
$angeltype['name'],
(bool)$angeltype['restricted'],
(int)$angeltype['restricted'],
$angeltype['description'],
(bool)$angeltype['requires_driver_license'],
(bool)$angeltype['no_self_signup'],
(int)$angeltype['requires_driver_license'],
(int)$angeltype['no_self_signup'],
$angeltype['contact_user_id'],
$angeltype['contact_name'],
$angeltype['contact_dect'],

View File

@ -75,12 +75,12 @@ function UserDriverLicenses_create($user_driver_license, $user)
',
[
$user_driver_license['user_id'],
(bool)$user_driver_license['has_car'],
(bool)$user_driver_license['has_license_car'],
(bool)$user_driver_license['has_license_3_5t_transporter'],
(bool)$user_driver_license['has_license_7_5t_truck'],
(bool)$user_driver_license['has_license_12_5t_truck'],
(bool)$user_driver_license['has_license_forklift'],
(int)$user_driver_license['has_car'],
(int)$user_driver_license['has_license_car'],
(int)$user_driver_license['has_license_3_5t_transporter'],
(int)$user_driver_license['has_license_7_5t_truck'],
(int)$user_driver_license['has_license_12_5t_truck'],
(int)$user_driver_license['has_license_forklift'],
]
);
@ -106,12 +106,12 @@ function UserDriverLicenses_update($user_driver_license)
WHERE `user_id`=?
',
[
(bool)$user_driver_license['has_car'],
(bool)$user_driver_license['has_license_car'],
(bool)$user_driver_license['has_license_3_5t_transporter'],
(bool)$user_driver_license['has_license_7_5t_truck'],
(bool)$user_driver_license['has_license_12_5t_truck'],
(bool)$user_driver_license['has_license_forklift'],
(int)$user_driver_license['has_car'],
(int)$user_driver_license['has_license_car'],
(int)$user_driver_license['has_license_3_5t_transporter'],
(int)$user_driver_license['has_license_7_5t_truck'],
(int)$user_driver_license['has_license_12_5t_truck'],
(int)$user_driver_license['has_license_forklift'],
$user_driver_license['user_id'],
]
);

View File

@ -60,13 +60,13 @@ function User_update($user)
$user['DECT'],
$user['Handy'],
$user['email'],
(bool)$user['email_shiftinfo'],
(bool)$user['email_by_human_allowed'],
(int)$user['email_shiftinfo'],
(int)$user['email_by_human_allowed'],
$user['jabber'],
$user['Size'],
$user['Gekommen'],
$user['Aktiv'],
(bool)$user['force_active'],
(int)$user['force_active'],
$user['Tshirt'],
$user['color'],
$user['Sprache'],