Added Email Logging for Emailnotification class

This commit is contained in:
Frank Schubert
2025-08-22 17:49:54 +02:00
parent 866c3b2ae1
commit 3a86160b38
26 changed files with 1636 additions and 46 deletions
+34 -12
View File
@@ -201,7 +201,7 @@ class FronkDB {
return $array;
}
public function insert($_table, $_data, $_forcestr = array(), $options = array()) {
public function insert($_table, $_data, $_forcestr = array(), $_forcebinary = array()) {
if(empty($_table)) {
$this->lastError = "Error constructing INSERT: tablename ommited";
return false;
@@ -225,13 +225,19 @@ class FronkDB {
$_Q = "";
}
}
if($v === null) {
$_Q = '';
$v = "NULL";
}
$fields .= ",`$f`";
$values .= "," . $_Q . $v . $_Q;
if($v === null) {
$values .= ", NULL";
} else {
if(in_array($f, $_forcebinary)) {
$values .= ", _binary" . $_Q . $v . $_Q;
} else {
$values .= "," . $_Q . $v . $_Q;
}
}
}
$fields = preg_replace('/^,/', '', $fields);
@@ -246,7 +252,7 @@ class FronkDB {
return true;
}
public function update($_table, $_data, $_where, $_forcestr = array()) {
public function update($_table, $_data, $_where, $_forcestr = array(), $_forcebinary = array()) {
if(empty($_table)) {
$this->lastError = "Error constructing UPDATE: tablename ommited";
return false;
@@ -276,12 +282,16 @@ class FronkDB {
$_Q = '';
}
}
if($v === null) {
$_Q = '';
$v = "NULL";
}
$Pairs .= ", `$f`=" . $_Q . $v . $_Q;
if($v === null) {
$Pairs .= ", `$f`=NULL";
} else {
if(in_array($f, $_forcebinary)) {
$Pairs .= ", `$f`= _binary " . $_Q . $v . $_Q;
} else {
$Pairs .= ", `$f`=" . $_Q . $v . $_Q;
}
}
}
$Pairs = preg_replace('/^,/', '', $Pairs);
@@ -361,4 +371,16 @@ class FronkDB {
return false;
}
}
public function startTransaction() {
$this->query("START TRANSACTION");
}
public function commitTransaction() {
$this->query("COMMIT");
}
public function rollbackTransaction() {
$this->query("ROLLBACK");
}
}