[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [13777] Syncromind: Merge 13774:13775 from trunk
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [13777] Syncromind: Merge 13774:13775 from trunk |
Date: |
Tue, 25 Aug 2015 20:18:12 +0000 |
Revision: 13777
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=13777
Author: sigurdne
Date: 2015-08-25 20:18:12 +0000 (Tue, 25 Aug 2015)
Log Message:
-----------
Syncromind: Merge 13774:13775 from trunk
Modified Paths:
--------------
branches/dev-syncromind/phpgwapi/inc/class.db_pdo.inc.php
Property Changed:
----------------
branches/dev-syncromind/
Property changes on: branches/dev-syncromind
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/stavangerkommune:12743-12875,12986
/trunk:12111-12211,12213-12246,12250-12363,12366-12405,12407-12435,12437-12462,12464-12527,12530-12602,12604-12670,12672-12683,12686-12750,12753-12785,12787-12974,12987,12989-13177,13179-13344,13346-13399,13401-13432,13434-13481,13483-13506,13542-13602,13604-13653,13656-13668,13670-13689,13691-13726,13731-13773
+ /branches/stavangerkommune:12743-12875,12986
/trunk:12111-12211,12213-12246,12250-12363,12366-12405,12407-12435,12437-12462,12464-12527,12530-12602,12604-12670,12672-12683,12686-12750,12753-12785,12787-12974,12987,12989-13177,13179-13344,13346-13399,13401-13432,13434-13481,13483-13506,13542-13602,13604-13653,13656-13668,13670-13689,13691-13726,13731-13773,13775
Modified: branches/dev-syncromind/phpgwapi/inc/class.db_pdo.inc.php
===================================================================
--- branches/dev-syncromind/phpgwapi/inc/class.db_pdo.inc.php 2015-08-25
20:16:38 UTC (rev 13776)
+++ branches/dev-syncromind/phpgwapi/inc/class.db_pdo.inc.php 2015-08-25
20:18:12 UTC (rev 13777)
@@ -359,13 +359,11 @@
{
$this->connect();
}
-
- if(!$exec)
+ $fetch = true;
+ if(preg_match('/(^INSERT INTO|^DELETE
FROM|^CREATE|^DROP|^ALTER|^UPDATE)/i', $sql)) // need it for MySQL and Oracle
{
- if(preg_match('/(^INSERT INTO|^DELETE
FROM|^CREATE|^DROP|^ALTER|^UPDATE)/i', $sql)) // need it for MySQL and Oracle
- {
- $exec = true;
- }
+// $exec = true; //ignored
+ $fetch = false;
}
try
@@ -380,24 +378,28 @@
*/
{
$statement_object =
$this->db->query($sql);
+ if($fetch)
+ {
/*
- $num_rows =
$this->statement_object->rowCount();
- if($num_rows > 200)
- {
- $fetch_single = true;
- $this->fetch_single =
$fetch_single;
- }
+ $num_rows =
$this->statement_object->rowCount();
+ if($num_rows > 200)
+ {
+ $fetch_single = true;
+ $this->fetch_single =
$fetch_single;
+ }
*/
- if($fetch_single)
- {
- $this->resultSet =
$statement_object->fetch($this->pdo_fetchmode);
- $this->statement_object =
$statement_object;
- unset($statement_object);
+
+ if($fetch_single)
+ {
+ $this->resultSet =
$statement_object->fetch($this->pdo_fetchmode);
+ $this->statement_object
= $statement_object;
+
unset($statement_object);
+ }
+ else
+ {
+ $this->resultSet =
$statement_object->fetchAll($this->pdo_fetchmode);
+ }
}
- else
- {
- $this->resultSet =
$statement_object->fetchAll($this->pdo_fetchmode);
- }
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [13777] Syncromind: Merge 13774:13775 from trunk,
Sigurd Nes <=