fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [10510] dbo: fetch vs fetchall


From: Sigurd Nes
Subject: [Fmsystem-commits] [10510] dbo: fetch vs fetchall
Date: Fri, 16 Nov 2012 14:44:42 +0000

Revision: 10510
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10510
Author:   sigurdne
Date:     2012-11-16 14:44:41 +0000 (Fri, 16 Nov 2012)
Log Message:
-----------
dbo: fetch vs fetchall

Modified Paths:
--------------
    trunk/controller/inc/class.socommon.inc.php
    trunk/phpgwapi/inc/class.db_pdo.inc.php
    trunk/property/inc/class.solocation.inc.php
    trunk/property/inc/class.soproject.inc.php
    trunk/property/inc/class.sotts.inc.php
    trunk/property/inc/class.soworkorder.inc.php
    trunk/rental/inc/class.socommon.inc.php

Modified: trunk/controller/inc/class.socommon.inc.php
===================================================================
--- trunk/controller/inc/class.socommon.inc.php 2012-11-16 14:43:49 UTC (rev 
10509)
+++ trunk/controller/inc/class.socommon.inc.php 2012-11-16 14:44:41 UTC (rev 
10510)
@@ -293,6 +293,8 @@
                                }
                        }
 
+                       $this->db->set_fetch_single(false);
+
                        return $results;
                }
 

Modified: trunk/phpgwapi/inc/class.db_pdo.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.db_pdo.inc.php     2012-11-16 14:43:49 UTC (rev 
10509)
+++ trunk/phpgwapi/inc/class.db_pdo.inc.php     2012-11-16 14:44:41 UTC (rev 
10510)
@@ -350,12 +350,10 @@
                */
                public function query($sql, $line = '', $file = '', $exec = 
false, $_fetch_single = false)
                {
-//_Debug_Array($sql);
-                       $this->_get_fetchmode();
+                       self::_get_fetchmode();
+                       self::set_fetch_single($_fetch_single);
 
-                       //FIXME
-                       $fetch_single = $_fetch_single;
-                       $this->fetch_single = $_fetch_single;
+                       $fetch_single = $this->fetch_single;
 
                        if ( !$this->db )
                        {

Modified: trunk/property/inc/class.solocation.inc.php
===================================================================
--- trunk/property/inc/class.solocation.inc.php 2012-11-16 14:43:49 UTC (rev 
10509)
+++ trunk/property/inc/class.solocation.inc.php 2012-11-16 14:44:41 UTC (rev 
10510)
@@ -974,6 +974,8 @@
                                $j++;                           
                        }
 
+                       $this->db->set_fetch_single(false);
+
                        $values = $this->custom->translate_value($dataset, 
$location_id, $location_count);
                        return $values;
                }

Modified: trunk/property/inc/class.soproject.inc.php
===================================================================
--- trunk/property/inc/class.soproject.inc.php  2012-11-16 14:43:49 UTC (rev 
10509)
+++ trunk/property/inc/class.soproject.inc.php  2012-11-16 14:44:41 UTC (rev 
10510)
@@ -638,6 +638,8 @@
                                        $project_list[] = array('project_id' => 
$this->db->f('id'));
                                }
 
+                               $this->db->set_fetch_single(false);
+
                                foreach($project_list as &$project)
                                {
                                        $this->db->query("{$sql} WHERE 
fm_project.id = '{$project['project_id']}' {$group_method}");

Modified: trunk/property/inc/class.sotts.inc.php
===================================================================
--- trunk/property/inc/class.sotts.inc.php      2012-11-16 14:43:49 UTC (rev 
10509)
+++ trunk/property/inc/class.sotts.inc.php      2012-11-16 14:44:41 UTC (rev 
10510)
@@ -557,6 +557,8 @@
                                }
                        }
 
+                       $this->db->set_fetch_single(false);
+
                        return $tickets;
                }
 

Modified: trunk/property/inc/class.soworkorder.inc.php
===================================================================
--- trunk/property/inc/class.soworkorder.inc.php        2012-11-16 14:43:49 UTC 
(rev 10509)
+++ trunk/property/inc/class.soworkorder.inc.php        2012-11-16 14:44:41 UTC 
(rev 10510)
@@ -721,6 +721,8 @@
                                $workorder_list[] = array('workorder_id' => 
$this->db->f('id'));
                        }
 
+                       $this->db->set_fetch_single(false);
+
                        foreach($workorder_list as &$workorder)
                        {
                                $this->db->query("{$sql} WHERE fm_workorder.id 
= '{$workorder['workorder_id']}'");

Modified: trunk/rental/inc/class.socommon.inc.php
===================================================================
--- trunk/rental/inc/class.socommon.inc.php     2012-11-16 14:43:49 UTC (rev 
10509)
+++ trunk/rental/inc/class.socommon.inc.php     2012-11-16 14:44:41 UTC (rev 
10510)
@@ -246,6 +246,9 @@
                                }
                        }
                }
+
+               $this->db->set_fetch_single(false);
+
                return $results;
        }
        




reply via email to

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