Handle errors better when updating row
This commit is contained in:
parent
f8fb62c77b
commit
0224ccd4cb
@ -197,7 +197,11 @@ function updateDatabaseRow($tableName, $originalRow, $newRowValue) {
|
||||
}
|
||||
|
||||
$sql_instruction = "UPDATE $tableName SET " . implode(", ", $setStatements) . " WHERE " . implode(" AND ", $whereStatements);
|
||||
sql($sql_instruction);
|
||||
try {sql($sql_instruction);}
|
||||
catch (Exception $e) {
|
||||
echo "ERROR: while trying $sql_instruction\n\n";print_r($e->getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function updateTriggerError($tableName, $error) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user