Finished IvtProductMatch
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user