Finished IvtProductMatch

This commit is contained in:
Frank Schubert
2023-10-03 20:02:13 +02:00
parent dd4bf56aa3
commit 7c81125afd
8 changed files with 208 additions and 71 deletions

View File

@@ -79,16 +79,21 @@ class FronkDB {
//echo "$sql\n";
}
if($this->result=mysqli_query($this->link,$sql)) {
return $this->result;
} else {
$this->lastError=mysqli_error($this->link);
if($print_error) {
echo "Error in SQL-query:<br />\n".$sql."<br />\n".$this->lastError."<br />\n";
}
$this->log->warn("SQL Query failed: $sql");
return false;
}
try {
if($this->result=mysqli_query($this->link,$sql)) {
return $this->result;
} else {
$this->lastError=mysqli_error($this->link);
if($print_error) {
echo "Error in SQL-query:<br />\n".$sql."<br />\n".$this->lastError."<br />\n";
}
$this->log->warn("SQL Query failed: $sql");
return false;
}
} catch (\Exception $e) {
$this->log->warn("SQL Query Exception ".$e->getCode().": ". $e->getMessage()."\nQuery was:\n$sql");
throw $e;
}
}
public function getLastError() {