cvs: pear /MDB2_Schema/MDB2 Schema.php

From: Date: Tue, 27 Feb 2007 23:26:34 +0000
Subject: cvs: pear /MDB2_Schema/MDB2 Schema.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-44897@lists.php.net to get a copy of this message
ifeghali Tue Feb 27 23:26:34 2007 UTC Modified files: /pear/MDB2_Schema/MDB2 Schema.php Log: - column identifiers quoting problem (Bug #10195) http://cvs.php.net/viewvc.cgi/pear/MDB2_Schema/MDB2/Schema.php?r1=1.105&r2=1.106&diff_format=u Index: pear/MDB2_Schema/MDB2/Schema.php diff -u pear/MDB2_Schema/MDB2/Schema.php:1.105 pear/MDB2_Schema/MDB2/Schema.php:1.106 --- pear/MDB2_Schema/MDB2/Schema.php:1.105 Sat Oct 28 12:37:32 2006 +++ pear/MDB2_Schema/MDB2/Schema.php Tue Feb 27 23:26:33 2007 @@ -42,7 +42,7 @@ // | Author: Lukas Smith <smith@pooteeweet.org> | // +----------------------------------------------------------------------+ // -// $Id: Schema.php,v 1.105 2006/10/28 12:37:32 ifeghali Exp $ +// $Id: Schema.php,v 1.106 2007/02/27 23:26:33 ifeghali Exp $ // require_once 'MDB2.php'; @@ -2064,10 +2064,12 @@ ) { foreach ($database_definition['tables'] as $table_name => $table) { $fields = array(); + $fieldsq = array(); foreach ($table['fields'] as $field_name => $field) { $fields[$field_name] = $field['type']; + $fieldsq[] = $this->db->quoteIdentifier($field_name, true); } - $query = 'SELECT '.implode(', ', array_keys($fields)).' FROM '; + $query = 'SELECT '.implode(', ', $fieldsq).' FROM '; $query.= $this->db->quoteIdentifier($table_name, true); $data = $this->db->queryAll($query, $fields, MDB2_FETCHMODE_ASSOC); if (PEAR::isError($data)) {

« previous php.pear.cvs (#44897) next »