1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2026-02-10 16:01:33 +00:00

add experimental support for PDO (_ENABLE_PDO)

This commit is contained in:
Andrew Dolgov
2013-04-18 08:20:45 +04:00
parent 7329ab2dd5
commit 9ee90455b8
3 changed files with 35 additions and 9 deletions

View File

@@ -24,7 +24,7 @@ class Db_PDO implements IDb {
function query($query, $die_on_error = true) {
try {
return $this->pdo->query($query);
return new Db_Stmt($this->pdo->query($query));
} catch (PDOException $e) {
user_error($e->getMessage(), $die_on_error ? E_USER_ERROR : E_USER_WARNING);
}
@@ -55,13 +55,7 @@ class Db_PDO implements IDb {
}
function fetch_result($result, $row, $param) {
$line = $this->fetch_assoc($result);
if ($line)
return $line[$param];
else
return null;
return $result->fetch_result($row, $param);
}
function close() {