Whitespace
This commit is contained in:
parent
dd542d5b30
commit
55e739d4ea
|
@ -112,7 +112,7 @@ function dbLog($sql, $update=false) {
|
||||||
function dbError($sql) {
|
function dbError($sql) {
|
||||||
global $dbConn;
|
global $dbConn;
|
||||||
$error = $dbConn->errorInfo();
|
$error = $dbConn->errorInfo();
|
||||||
if ( !$error[0] )
|
if (!$error[0])
|
||||||
return '';
|
return '';
|
||||||
|
|
||||||
$message = "SQL-ERR '".implode("\n", $dbConn->errorInfo())."', statement was '".$sql."'";
|
$message = "SQL-ERR '".implode("\n", $dbConn->errorInfo())."', statement was '".$sql."'";
|
||||||
|
@ -130,17 +130,17 @@ function dbEscape( $string ) {
|
||||||
|
|
||||||
function dbQuery($sql, $params=NULL, $debug = false) {
|
function dbQuery($sql, $params=NULL, $debug = false) {
|
||||||
global $dbConn;
|
global $dbConn;
|
||||||
if ( dbLog($sql, true) )
|
if (dbLog($sql, true))
|
||||||
return;
|
return;
|
||||||
$result = NULL;
|
$result = NULL;
|
||||||
try {
|
try {
|
||||||
if ( isset($params) ) {
|
if (isset($params)) {
|
||||||
if ( ! $result = $dbConn->prepare($sql) ) {
|
if (!$result = $dbConn->prepare($sql)) {
|
||||||
ZM\Error("SQL: Error preparing $sql: " . $pdo->errorInfo);
|
ZM\Error("SQL: Error preparing $sql: " . $pdo->errorInfo);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! $result->execute($params) ) {
|
if (!$result->execute($params)) {
|
||||||
ZM\Error("SQL: Error executing $sql: " . print_r($result->errorInfo(), true));
|
ZM\Error("SQL: Error executing $sql: " . print_r($result->errorInfo(), true));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue