|
@ -147,7 +147,10 @@ class SqlCriteria |
|
|
*/ |
|
|
*/ |
|
|
public function select($fields) |
|
|
public function select($fields) |
|
|
{ |
|
|
{ |
|
|
$fields = array_map(function($item){return trim($item);},explode(',', $fields)); |
|
|
|
|
|
|
|
|
if (!is_array($fields)) { |
|
|
|
|
|
$fields = explode(',', $fields); |
|
|
|
|
|
} |
|
|
|
|
|
$fields = array_map(function($item){return trim($item);},$fields); |
|
|
$this->select = array_merge($this->select,$fields); |
|
|
$this->select = array_merge($this->select,$fields); |
|
|
return $this; |
|
|
return $this; |
|
|
} |
|
|
} |
|
|