diff --git a/model/SqlCriteria.php b/model/SqlCriteria.php index 3da0777..106cf9e 100644 --- a/model/SqlCriteria.php +++ b/model/SqlCriteria.php @@ -134,7 +134,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; }