]> git.joonet.de Git - adminer.git/commitdiff
PostgreSQL: Fix number of affected rows after clone
authorJakub Vrana <jakub@vrana.cz>
Mon, 24 Mar 2025 09:24:47 +0000 (10:24 +0100)
committerJakub Vrana <jakub@vrana.cz>
Mon, 24 Mar 2025 11:18:24 +0000 (12:18 +0100)
adminer/select.inc.php

index 9092d520f303bce1408a73b97193a123b4f53f02..8ae4ca581c5f2797c56f031432e9600d94a54e8d 100644 (file)
@@ -129,7 +129,7 @@ if ($_POST && !$error) {
                                                        : $driver->update($TABLE, $set, $where_check)
                                                )
                                        );
-                                       $affected = $connection->affected_rows;
+                                       $affected = $connection->affected_rows + (is_object($result) ? $result->num_rows : 0); // PostgreSQL with RETURNING fills num_rows
                                } else {
                                        foreach ((array) $_POST["check"] as $val) {
                                                // where is not unique so OR can't be used