From: ioguix Date: Wed, 20 Feb 2008 20:43:09 +0000 (+0000) Subject: fix bug reported by Kristoffer `spq` Janke about bad formated DELETE FROM when dropin... X-Git-Tag: REL_4-2-BETA-2~12 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=99ad1e556d892bcadbf6d7aeab4656c66efabfbd;p=phppgadmin.git fix bug reported by Kristoffer `spq` Janke about bad formated DELETE FROM when droping a row. --- 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;