From 7d9fa6f2495bbe435d9d66f6cd986200ba9b7b47 Mon Sep 17 00:00:00 2001 From: Antonio de la Rosa Date: Mon, 9 Nov 2015 03:01:14 +0100 Subject: [PATCH] Fix regression in conditions of Webmodel --- src/Webmodel.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Webmodel.php b/src/Webmodel.php index 84b0884..7255294 100644 --- a/src/Webmodel.php +++ b/src/Webmodel.php @@ -672,11 +672,11 @@ class Webmodel { * Method for add conditions to sql operations in this model * * @param array $conditions An array with two elements. The first element define the where statement where the values are marked with ? symbol. The real values are saved in second element of the array. The behaviour is similar to python sql statements or PDO. - * @example ['WHERE name=? and lastname=?', 'Anthony', 'Smith'] + * @example ['WHERE name=? and lastname=?', ['Anthony', 'Smith']] * @warning Use an string for conditions is deprecated, use the array type. */ - public function set_conditions($conditions, $order_by='', $limit='') + public function set_conditions($conditions) { $str_conditions=$this->conditions; @@ -724,11 +724,11 @@ class Webmodel { } - $this->conditions=implode(' ', $arr_conditions); + $this->conditions=trim(implode(' ', $arr_conditions)); } - $this->order_by=$order_by; + //$this->order_by=$order_by; }