Reenabled PDO engine.
This commit is contained in:
parent
018b1f0086
commit
dfa52185ca
2 changed files with 13 additions and 12 deletions
|
@ -1,9 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
// Temporarily removed
|
|
||||||
//if(class_exists('\PDO') && in_array('mysql', PDO::getAvailableDrivers())) {
|
# if PDO is avaible for mysql, use the new database abstraction
|
||||||
// require_once("library/dddbl2/dddbl.php");
|
if(class_exists('\PDO') && in_array('mysql', PDO::getAvailableDrivers())) {
|
||||||
// require_once("include/dba_pdo.php");
|
require_once("library/dddbl2/dddbl.php");
|
||||||
//}
|
require_once("include/dba_pdo.php");
|
||||||
|
}
|
||||||
|
|
||||||
require_once('include/datetime.php');
|
require_once('include/datetime.php');
|
||||||
|
|
||||||
|
|
|
@ -191,7 +191,8 @@ class dba {
|
||||||
return $result;
|
return $result;
|
||||||
|
|
||||||
if ($onlyquery) {
|
if ($onlyquery) {
|
||||||
$this->result = $result;
|
$this->result = $r; # this will store an PDOStatement Object in result
|
||||||
|
$this->result->execute(); # execute the Statement, to get its result
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -204,7 +205,7 @@ class dba {
|
||||||
|
|
||||||
public function qfetch() {
|
public function qfetch() {
|
||||||
|
|
||||||
if (!$this->result)
|
if (false === $this->result)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return $this->result->fetch();
|
return $this->result->fetch();
|
||||||
|
@ -213,7 +214,7 @@ class dba {
|
||||||
|
|
||||||
public function qclose() {
|
public function qclose() {
|
||||||
if ($this->result)
|
if ($this->result)
|
||||||
$this->result->closeCursor();
|
return $this->result->closeCursor();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function dbg($dbg) {
|
public function dbg($dbg) {
|
||||||
|
@ -337,4 +338,3 @@ if(! function_exists('dba_timer')) {
|
||||||
function dba_timer() {
|
function dba_timer() {
|
||||||
return microtime(true);
|
return microtime(true);
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue