From 0224ccd4cb1c73b63ccb12c808583d44a8053c2f Mon Sep 17 00:00:00 2001 From: git Date: Sat, 21 Jun 2025 18:36:17 +0100 Subject: [PATCH] Handle errors better when updating row --- plt/index.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plt/index.php b/plt/index.php index e29bf9a..e160364 100755 --- a/plt/index.php +++ b/plt/index.php @@ -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) {