summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorioguix2008-02-20 20:43:09 +0000
committerioguix2008-02-20 20:43:09 +0000
commit99ad1e556d892bcadbf6d7aeab4656c66efabfbd (patch)
treedfd2077396320ab5d3a31878291128178b2e3a1b
parent1d9918521983c26589f594f2fd452a91aceab7e3 (diff)
fix bug reported by Kristoffer `spq` Janke about bad formated DELETE FROM when droping a row.
-rw-r--r--classes/database/ADODB_base.php6
-rwxr-xr-xclasses/database/Postgres.php4
2 files changed, 6 insertions, 4 deletions
diff --git a/classes/database/ADODB_base.php b/classes/database/ADODB_base.php
index 642b453d..816d6930 100644
--- a/classes/database/ADODB_base.php
+++ b/classes/database/ADODB_base.php
@@ -3,7 +3,7 @@
/*
* Parent class of all ADODB objects.
*
- * $Id: ADODB_base.php,v 1.23 2007/12/12 04:11:10 xzilla Exp $
+ * $Id: ADODB_base.php,v 1.24 2008/02/20 20:43:10 ioguix Exp $
*/
include_once('./libraries/errorhandler.inc.php');
@@ -134,8 +134,10 @@ class ADODB_base {
reset($conditions);
- if (!empty($schema))
+ if (!empty($schema)) {
+ $this->fieldClean($schema);
$schema = "\"{$schema}\".";
+ }
// Build clause
$sql = '';
diff --git a/classes/database/Postgres.php b/classes/database/Postgres.php
index c60c7633..00d18be8 100755
--- a/classes/database/Postgres.php
+++ b/classes/database/Postgres.php
@@ -4,7 +4,7 @@
* A class that implements the DB interface for Postgres
* Note: This class uses ADODB and returns RecordSets.
*
- * $Id: Postgres.php,v 1.319 2008/01/19 13:46:15 ioguix Exp $
+ * $Id: Postgres.php,v 1.320 2008/02/20 20:43:09 ioguix Exp $
*/
// @@@ THOUGHT: What about inherits? ie. use of ONLY???
@@ -1656,7 +1656,7 @@ class Postgres extends ADODB_base {
return -1;
}
- $status = $this->delete($table, $key, $this->schema());
+ $status = $this->delete($table, $key, $this->_schema);
if ($status != 0 || $this->conn->Affected_Rows() != 1) {
$this->rollbackTransaction();
return -2;