Public Member Functions | |
| __construct ($result) | |
| Constructor. | |
| affected_rows () | |
| Return num of affected rows from insert/delete/update query. | |
| fetch_array () | |
| Return resultset as assoc array. | |
| fetch_object () | |
| Return resultset as object. | |
| fetch_row () | |
| Return resultset as numeric array. | |
| field ($field) | |
| Return resultset record. | |
| flush () | |
| Free resultset memory - destroy resultset object. | |
| num_fields () | |
| Return num fields from select query. | |
| num_rows () | |
| Return num rows from select query - MUST be used with "select count(*)". | |
| result () | |
| Return resultset object. | |
Definition at line 15 of file db2Resultset.php.
| __construct | ( | $ | result | ) |
Constructor.
public
| mixed | $result |
Definition at line 47 of file db2Resultset.php.
{
$this->objResult = $result;
}
| affected_rows | ( | ) |
Return num of affected rows from insert/delete/update query.
public
Definition at line 58 of file db2Resultset.php.
{
if ( $this->objResult )
return db2_num_rows( $this->objResult );
}
| fetch_array | ( | ) |
Return resultset as assoc array.
public
Definition at line 70 of file db2Resultset.php.
{
if ( $this->objResult )
{
$this->objRecord = db2_fetch_assoc( $this->objResult );
return ( $this->objRecord != null );
}
}
| fetch_object | ( | ) |
Return resultset as object.
public
Definition at line 86 of file db2Resultset.php.
{
if ( $this->objResult )
return db2_fetch_object( $this->objResult );
}
| fetch_row | ( | ) |
Return resultset as numeric array.
public
Definition at line 98 of file db2Resultset.php.
{
if ( $this->objResult )
{
$this->objRecord = db2_fetch_array( $this->objResult );
return ( $this->objRecord != null );
}
}
| field | ( | $ | field | ) |
Return resultset record.
public
| mixed | $field |
Definition at line 115 of file db2Resultset.php.
{
if ( $this->objResult )
{
if ( get_magic_quotes_runtime() )
return stripslashes( $this->objRecord[strtoupper( $field )] );
else
return $this->objRecord[strtoupper( $field )];
}
}
| flush | ( | ) |
Free resultset memory - destroy resultset object.
public
Definition at line 131 of file db2Resultset.php.
{
if ( $this->objResult )
{
db2_free_result( $this->objResult );
$this->objRecord = array();
$this->objResult = null;
}
}
| num_fields | ( | ) |
Return num fields from select query.
public
Definition at line 147 of file db2Resultset.php.
{
if ( $this->objResult )
return db2_num_fields( $this->objResult );
}
| num_rows | ( | ) |
Return num rows from select query - MUST be used with "select count(*)".
public
Definition at line 159 of file db2Resultset.php.
{
if ( $this->objResult )
{
while ( $row = db2_fetch_array( $this->objResult ) )
return $row[0];
}
}
| result | ( | ) |
Return resultset object.
public
Definition at line 174 of file db2Resultset.php.
{
return $this->objResult;
}
1.7.1