diff --git a/model/DbStatement.php b/model/DbStatement.php index 0386c24..d5a3200 100644 --- a/model/DbStatement.php +++ b/model/DbStatement.php @@ -151,6 +151,14 @@ abstract class DbStatement return false; } + public function fetchPairs() + { + while ($row = $this->fetch(Db::FETCH_NUM)) { + $data[$row[0]] = $row[1]; + } + return $data; + } + /* Abstract methods */ abstract public function fetch($style = Db::FETCH_OBJ);