DBResultSet Class Reference
[Model]
Result set. More...
Inheritance diagram for DBResultSet:
Public Member Functions |
|
__construct ($pdo) | |
close () | |
Closes internal cursor. |
|
fetch () | |
Returns row as associative array. |
|
get_column_count () | |
Returns number of columns in result set.
|
|
get_row_count () | |
Returns number of rows in result set.
|
|
get_status () | |
Returns status. |
|
Protected Attributes |
|
$pdo_statement = null |
Detailed Description
Result set.
Definition at line 8 of file dbresultset.cls.php.
Constructor & Destructor Documentation
DBResultSet::__construct | ( | $ | pdo | ) |
Definition at line 16 of file dbresultset.cls.php.
Member Function Documentation
DBResultSet::close | ( | ) |
Closes internal cursor.
- Returns:
- void
Implements IDBResultSet.
Definition at line 25 of file dbresultset.cls.php.
DBResultSet::fetch | ( | ) |
Returns row as associative array.
- Returns:
- array | bool False if no more data is available
Implements IDBResultSet.
Definition at line 52 of file dbresultset.cls.php.
DBResultSet::get_column_count | ( | ) |
Returns number of columns in result set.
- Returns:
- int
Implements IDBResultSet.
Definition at line 34 of file dbresultset.cls.php.
DBResultSet::get_row_count | ( | ) |
Returns number of rows in result set.
- Returns:
- int
Implements IDBResultSet.
Definition at line 43 of file dbresultset.cls.php.
DBResultSet::get_status | ( | ) |
Returns status.
- Parameters:
-
Status
Implements IDBResultSet.
Definition at line 61 of file dbresultset.cls.php.
00061 { 00062 $ret = new Status(); 00063 $stub = substr($this->pdo_statement->errorCode(), 0, 2); 00064 switch ($stub) { 00065 case '00': 00066 // No error 00067 break; 00068 case '01': 00069 case 'IM': 00070 // Warnings 00071 break; 00072 default: 00073 $info = $this->pdo_statement->errorInfo(); 00074 $ret->append($info[2]); 00075 break; 00076 } 00077 return $ret; 00078 }
Member Data Documentation
DBResultSet::$pdo_statement = null
[protected] |
Definition at line 14 of file dbresultset.cls.php.
The documentation for this class was generated from the following file:
- gyro/core/model/base/dbresultset.cls.php