Whitespace

This commit is contained in:
Isaac Connor 2021-11-09 10:49:01 -05:00
parent 9036728bdc
commit 944c04e5b4
1 changed files with 5 additions and 5 deletions

View File

@ -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;
}