From 4902f41a3f3e9231a1817b3e703a656974cb7438 Mon Sep 17 00:00:00 2001 From: paolo Date: Fri, 1 Jul 2016 12:17:08 +0200 Subject: [PATCH] Added addSelect to DB_Model --- application/core/DB_Model.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/application/core/DB_Model.php b/application/core/DB_Model.php index f1bf03407..72b34a38f 100644 --- a/application/core/DB_Model.php +++ b/application/core/DB_Model.php @@ -231,6 +231,22 @@ class DB_Model extends FHC_Model return $this->_success(TRUE); } + /** --------------------------------------------------------------- + * Add select clause + * + * @return void + */ + public function addSelect($select) + { + // Check Class-Attributes and parameters + if (is_null($select) || $select == '') + return $this->_error(lang('fhc_'.FHC_NODBTABLE), FHC_MODEL_ERROR); + + $this->db->select($select); + + return $this->_success(TRUE); + } + /** --------------------------------------------------------------- * Add distinct clause *