public function getAll($fields = null, $sqlQuery = false)
    {
        $sql = $this->buildQuery('select', $fields);
        if($sqlQuery === true) {
            return $this->getQuery();
        }
        $result = $this->executeQuery($sql);
        if($result->num_rows == 0) {
            return [];
        }
        while($row = $result->fetch_array(MYSQLI_ASSOC)) {
            $data[] = $row;
        }
        return $data;
    }
public function getAll($fields = null, $sqlQuery = false)
    {
        $sql = $this->buildQuery('select', $fields);
        if($sqlQuery === true) {
            return $this->getQuery();
        }
        $result = $this->executeQuery($sql);
        if($result->num_rows == 0) {
            return [];
        }
        while($row = $result->fetch_array(MYSQLI_ASSOC)) {
            $data[] = $row;
        }
        return $data;
    }
public function getAll ( $ fields = null , $ sqlQuery = false ) { $ sql = $ this -> buildQuery ( 'select' , $ fields ) ; if ( $ sqlQuery === true ) { return $ this -> getQuery ( ) ; } $ result = $ this -> executeQuery ( $ sql ) ; if ( $ result -> num_rows == 0 ) { return [ ] ; } while ( $ row = $ result -> fetch_array ( MYSQLI_ASSOC ) ) { $ data [ ] = $ row ; } return $ data ; }
Get all fields from table

@param  array|null   $field
@param  string|null  $sqlQuery
@rturn  array
Get all fields from table