Improved.

This commit is contained in:
Yousha 2012-08-30 20:05:27 +04:30
parent fb4e28c7b8
commit 55470a7ac8
3 changed files with 48 additions and 55 deletions

View file

@ -73,6 +73,7 @@ function prepare($query) {
if ($config['debug'])
return new PreparedQueryDebug($query);
return $pdo->prepare($query);
}
@ -93,19 +94,19 @@ function query($query) {
'time' => '~' . $time
);
return $query;
} else {
return $pdo->query($query);
}
return $pdo->query($query);
}
function db_error($PDOStatement=null) {
global $pdo;
if (isset($PDOStatement)) {
$err = $PDOStatement->errorInfo();
return $err[2];
} else {
$err = $pdo->errorInfo();
return $err[2];
}
}
$err = $pdo->errorInfo();
return $err[2];
}