From 5267bc5d7ad20e96f98e058fc8614c0c0c749253 Mon Sep 17 00:00:00 2001 From: Cris Date: Wed, 29 Apr 2020 13:11:39 +0200 Subject: [PATCH] Added parameter ampel_id to method active() in Ampel_model --- application/models/content/Ampel_model.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/application/models/content/Ampel_model.php b/application/models/content/Ampel_model.php index eb513dce6..e75ea7c80 100644 --- a/application/models/content/Ampel_model.php +++ b/application/models/content/Ampel_model.php @@ -19,14 +19,20 @@ class Ampel_model extends DB_Model * @param bool $dauerampel * @return array Returns array of objects. */ - public function active($email = null, $dauerampel = null) + public function active($ampel_id = null, $email = null, $dauerampel = null) { $parametersArray = null; $query = ' SELECT * FROM public.tbl_ampel WHERE'; - + + if (is_numeric($ampel_id)) + { + $parametersArray['ampel_id'] = $ampel_id; + $query .= ' ampel_id = ? AND'; + } + if (is_bool($email)) { $parametersArray['email'] = $email;