Browse Source

fetchPairs method, #16

git-svn-id: svn+ssh://code.netmonsters.ru/svn/majestic/branches/evo@133 4cb57b5f-5bbd-dd11-951b-001d605cbbc5
master
pzinovkin 15 years ago
parent
commit
359a49c412
  1. 8
      model/DbStatement.php

8
model/DbStatement.php

@ -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);

Loading…
Cancel
Save