public function select($columns = "*") : QueryBuilder
    {
        $this->_query[] = "SELECT";

        //Parse column(s)
        if(is_array($columns)) {
            $select_columns = "";

            $size = sizeof($columns);
            for($i = 0; $i < $size; $i++) {
                if($i > 0) {
                    $select_columns .= ', ';
                }

                $select_columns .= '`'. $this->sanitize((string)$columns[$i]) .'`';
            }

            $this->_query[] = $select_columns;

            return $this;
        }

        $select_columns = "*";
        if(
            !empty($columns) &&
            $columns !== "*"
        ) {
            $select_columns = '`'. $this->sanitize((string)$columns) .'`';
        }

        $this->_query[] = $select_columns;

        return $this;
    }
public function select($columns = "*") : QueryBuilder
    {
        $this->_query[] = "SELECT";

        //Parse column(s)
        if(is_array($columns)) {
            $select_columns = "";

            $size = sizeof($columns);
            for($i = 0; $i < $size; $i++) {
                if($i > 0) {
                    $select_columns .= ', ';
                }

                $select_columns .= '`'. $this->sanitize((string)$columns[$i]) .'`';
            }

            $this->_query[] = $select_columns;

            return $this;
        }

        $select_columns = "*";
        if(
            !empty($columns) &&
            $columns !== "*"
        ) {
            $select_columns = '`'. $this->sanitize((string)$columns) .'`';
        }

        $this->_query[] = $select_columns;

        return $this;
    }
public function select ( $ columns = "*" ) : QueryBuilder { $ this -> _query [ ] = "SELECT" ; //Parse column(s) if ( is_array ( $ columns ) ) { $ select_columns = "" ; $ size = sizeof ( $ columns ) ; for ( $ i = 0 ; $ i < $ size ; $ i ++ ) { if ( $ i > 0 ) { $ select_columns .= ', ' ; } $ select_columns .= '`' . $ this -> sanitize ( ( string ) $ columns [ $ i ] ) . '`' ; } $ this -> _query [ ] = $ select_columns ; return $ this ; } $ select_columns = "*" ; if ( ! empty ( $ columns ) && $ columns !== "*" ) { $ select_columns = '`' . $ this -> sanitize ( ( string ) $ columns ) . '`' ; } $ this -> _query [ ] = $ select_columns ; return $ this ; }
Begins the select query.

@param string|array $columns Column(s) to select, if empty has same effect as "*".

@return QueryBuilder Chainability object.
Begins the select query .