phpcompta-dev
[Top][All Lists]
Advanced

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

[Phpcompta-dev] r4077 - phpcompta/trunk/include


From: phpcompta-dev
Subject: [Phpcompta-dev] r4077 - phpcompta/trunk/include
Date: Fri, 6 May 2011 20:33:32 +0200 (CEST)

Author: danydb
Date: 2011-05-06 20:33:31 +0200 (Fri, 06 May 2011)
New Revision: 4077

Modified:
   phpcompta/trunk/include/class_database.php
Log:
Add function fetch_row for pg_fetch_row


Modified: phpcompta/trunk/include/class_database.php
===================================================================
--- phpcompta/trunk/include/class_database.php  2011-05-02 21:55:48 UTC (rev 
4076)
+++ phpcompta/trunk/include/class_database.php  2011-05-06 18:33:31 UTC (rev 
4077)
@@ -115,7 +115,8 @@
      * \brief send a sql string to the database
      * \param $p_string     sql string
      * \param $p_array array for the SQL string (see pg_query_params)
-     * \return false if error otherwise true
+     * \return the result of the query, a resource or false if an
+     * error occured
      */
     function exec_sql( $p_string,$p_array=null)
     {
@@ -737,6 +738,15 @@
     {
         return pg_fetch_result($ret,$p_row,$p_col);
     }
+    /*!\brief wrapper for the function pg_fetch_row
+     *\param $ret is the result of pg_exec (exec_sql)
+     *\param $p_row is the indice of the row
+     *\return an array indexed from 0
+     */
+    static function fetch_row($ret,$p_row)
+    {
+        return pg_fetch_row($ret,$p_row);
+    }
 
     /*!\brief wrapper for the function pg_lo_unlink
      *\param $p_oid is the of oid




reply via email to

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