rm db_stmt

This commit is contained in:
Andrew Dolgov 2017-11-30 11:53:21 +03:00
parent 99bda9cc12
commit ca82bb03c8
1 changed files with 0 additions and 31 deletions

View File

@ -1,31 +0,0 @@
<?php
class Db_Stmt {
private $stmt;
private $cache;
function __construct($stmt) {
$this->stmt = $stmt;
$this->cache = false;
}
function fetch_result($row, $param) {
if (!$this->cache) {
$this->cache = $this->stmt->fetchAll();
}
if (isset($this->cache[$row])) {
return $this->cache[$row][$param];
} else {
user_error("Unable to jump to row $row", E_USER_WARNING);
return false;
}
}
function rowCount() {
return $this->stmt->rowCount();
}
function fetch() {
return $this->stmt->fetch();
}
}