noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 10/30: Database improve : new function get_af


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 10/30: Database improve : new function get_affected returns the number of rows affected by the last query
Date: Tue, 02 Jun 2015 22:29:07 +0000

sparkyx pushed a commit to branch master
in repository noalyss.

commit 7d9872c458b08dc5806364edfd58ea46d5becd58
Author: Dany De Bontridder <address@hidden>
Date:   Sun May 31 13:18:29 2015 +0200

    Database improve : new function get_affected returns the number of rows 
affected by the last query
---
 include/class_database.php |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/include/class_database.php b/include/class_database.php
index e7cfe93..37ebdac 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]