public function addSelect($columns) {
		if(is_array($columns))
			return $this->_addSelect($columns);

		$columns = explode(',', $columns);
		foreach($columns as $columnstr) {
			$columnstr = trim($columnstr);

			preg_match('/(.*?)\s+as\s+([a-z_][a-zA-Z0-9_]*)?$/i', $columnstr, $matches);
			if(isset($matches[2])) {
				$alias = $matches[2];
				$column = $matches[1];
			}
			else
				$alias = $column = $columnstr;

			if(isset($this->columns[$alias]))
				throw new \Exception('Column alias '.$alias.' is already used.');
			$this->columns[$alias] = $column;
		}

		return $this;
	}
public function addSelect($columns) {
		if(is_array($columns))
			return $this->_addSelect($columns);

		$columns = explode(',', $columns);
		foreach($columns as $columnstr) {
			$columnstr = trim($columnstr);

			preg_match('/(.*?)\s+as\s+([a-z_][a-zA-Z0-9_]*)?$/i', $columnstr, $matches);
			if(isset($matches[2])) {
				$alias = $matches[2];
				$column = $matches[1];
			}
			else
				$alias = $column = $columnstr;

			if(isset($this->columns[$alias]))
				throw new \Exception('Column alias '.$alias.' is already used.');
			$this->columns[$alias] = $column;
		}

		return $this;
	}
public function addSelect ( $ columns ) { if ( is_array ( $ columns ) ) return $ this -> _addSelect ( $ columns ) ; $ columns = explode ( ',' , $ columns ) ; foreach ( $ columns as $ columnstr ) { $ columnstr = trim ( $ columnstr ) ; preg_match ( '/(.*?)\s+as\s+([a-z_][a-zA-Z0-9_]*)?$/i' , $ columnstr , $ matches ) ; if ( isset ( $ matches [ 2 ] ) ) { $ alias = $ matches [ 2 ] ; $ column = $ matches [ 1 ] ; } else $ alias = $ column = $ columnstr ; if ( isset ( $ this -> columns [ $ alias ] ) ) throw new \ Exception ( 'Column alias ' . $ alias . ' is already used.' ) ; $ this -> columns [ $ alias ] = $ column ; } return $ this ; }
Add SELECT columns.
@param string|array $columns
@return DAL    $this
@api
Add SELECT columns .