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