]> git.wh0rd.org - tt-rss.git/blame - classes/db/stmt.php
remove some redundant php closing tags
[tt-rss.git] / classes / db / stmt.php
CommitLineData
9ee90455
AD
1<?php
2class Db_Stmt {
3 private $stmt;
4 private $cache;
5
6 function __construct($stmt) {
7 $this->stmt = $stmt;
8 $this->cache = false;
9 }
10
11 function fetch_result($row, $param) {
12 if (!$this->cache) {
13 $this->cache = $this->stmt->fetchAll();
14 }
15
16 if (isset($this->cache[$row])) {
17 return $this->cache[$row][$param];
18 } else {
19 user_error("Unable to jump to row $row", E_USER_WARNING);
20 return false;
21 }
22 }
23
24 function rowCount() {
25 return $this->stmt->rowCount();
26 }
27
28 function fetch() {
29 return $this->stmt->fetch();
30 }
ea79a0e0 31}