fetchPairs method, #16

git-svn-id: svn+ssh://code.netmonsters.ru/svn/majestic/branches/evo@133 4cb57b5f-5bbd-dd11-951b-001d605cbbc5
This commit is contained in:
pzinovkin
2010-03-23 15:47:32 +00:00
parent 2aeaedc2ef
commit 359a49c412

View File

@ -151,6 +151,14 @@ abstract class DbStatement
return false; return false;
} }
public function fetchPairs()
{
while ($row = $this->fetch(Db::FETCH_NUM)) {
$data[$row[0]] = $row[1];
}
return $data;
}
/* Abstract methods */ /* Abstract methods */
abstract public function fetch($style = Db::FETCH_OBJ); abstract public function fetch($style = Db::FETCH_OBJ);