From 7d9872c458b08dc5806364edfd58ea46d5becd58 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 31 May 2015 13:18:29 +0200 Subject: [PATCH] Database improve : new function get_affected returns the number of rows affected by the last query --- include/class_database.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/class_database.php b/include/class_database.php index e7cfe930e..37ebdacb1 100644 --- a/include/class_database.php +++ b/include/class_database.php @@ -533,6 +533,13 @@ class Database $r=pg_fetch_row($this->ret, 0); return $r[0]; } + /** + * @brief return the number of rows affected by the previous query + */ + function get_affected() + { + return Database::num_row($this->ret); + } /**\brief purpose return the result of a sql statment * in a array