32 $row = @pg_fetch_object( $this->result );
34 if ( is_object( $row ) ) {
35 $numFields = pg_num_fields( $this->result );
36 for ( $i = 0; $i < $numFields; $i++ ) {
37 if ( pg_field_type( $this->result, $i ) ===
'bool' ) {
38 $name = pg_field_name( $this->result, $i );
39 $row->$name = $this->convertBoolean( $row->$name );
48 $row = @pg_fetch_array( $this->result );
50 if ( is_array( $row ) ) {
51 $numFields = pg_num_fields( $this->result );
52 for ( $i = 0; $i < $numFields; $i++ ) {
53 if ( pg_field_type( $this->result, $i ) ===
'bool' ) {
54 $name = pg_field_name( $this->result, $i );
55 $row[$i] = $this->convertBoolean( $row[$i] );
56 $row[$name] = $this->convertBoolean( $row[$name] );