restoration after wrong rollback
git-svn-id: svn+ssh://code.netmonsters.ru/svn/majestic/trunk@89 4cb57b5f-5bbd-dd11-951b-001d605cbbc5
This commit is contained in:
@ -183,6 +183,28 @@ class ModelSelectResult extends ModelResult
|
||||
return $array;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches all SQL result rows as an array of key-value pairs.
|
||||
*
|
||||
* The first column is the key, the second column is the
|
||||
* value.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function fetchPairs()
|
||||
{
|
||||
if (!method_exists('DBConnector', 'fetchArray')) {
|
||||
throw new Exception('Method not implemented yet.');
|
||||
}
|
||||
|
||||
$data = array();
|
||||
while ($row = DBConnector::fetchArray($this->result, DBConnector::FETCH_NUM)) {
|
||||
$data[$row[0]] = $row[1];
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
function count()
|
||||
{
|
||||
return DBConnector::numRows($this->result);
|
||||
|
Reference in New Issue
Block a user