From 9ee90455b85350e9f9cd04faf36bad8742141cd9 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 18 Apr 2013 08:20:45 +0400 Subject: add experimental support for PDO (_ENABLE_PDO) --- classes/db/stmt.php | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 classes/db/stmt.php (limited to 'classes/db/stmt.php') diff --git a/classes/db/stmt.php b/classes/db/stmt.php new file mode 100644 index 000000000..4d3596ef1 --- /dev/null +++ b/classes/db/stmt.php @@ -0,0 +1,32 @@ +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(); + } +} +?> -- cgit v1.2.3