diff --git a/model/SqlCriteria.php b/model/SqlCriteria.php index d0f1041..a634257 100644 --- a/model/SqlCriteria.php +++ b/model/SqlCriteria.php @@ -146,7 +146,7 @@ class SqlCriteria */ public function select($fields) { - $fields = explode(',', $fields); + $fields = array_map(function($item){return trim($item);},explode(',', $fields)); $this->select = array_merge($this->select,$fields); return $this; }