Browse Source

Применение функции trim в методе SqlCriteria.select()

namespace
Alexander Demidov 11 years ago
parent
commit
1ea6c5acdd
  1. 2
      model/SqlCriteria.php

2
model/SqlCriteria.php

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

Loading…
Cancel
Save