cvs: pear /MDB2 MDB2.php

From: Date: Fri, 17 Mar 2006 08:47:03 +0000
Subject: cvs: pear /MDB2 MDB2.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-39145@lists.php.net to get a copy of this message
lsmith Fri Mar 17 08:47:03 2006 UTC Modified files: /pear/MDB2 MDB2.php Log: - added 'result_introspection' supported metadata support http://cvs.php.net/viewcvs.cgi/pear/MDB2/MDB2.php?r1=1.174&r2=1.175&diff_format=u Index: pear/MDB2/MDB2.php diff -u pear/MDB2/MDB2.php:1.174 pear/MDB2/MDB2.php:1.175 --- pear/MDB2/MDB2.php:1.174 Tue Mar 14 12:42:13 2006 +++ pear/MDB2/MDB2.php Fri Mar 17 08:47:03 2006 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@pooteeweet.org> | // +----------------------------------------------------------------------+ // -// $Id: MDB2.php,v 1.174 2006/03/14 12:42:13 lsmith Exp $ +// $Id: MDB2.php,v 1.175 2006/03/17 08:47:03 lsmith Exp $ // /** @@ -951,6 +951,7 @@ 'sub_selects' => false, 'auto_increment' => false, 'primary_key' => false, + 'result_introspection' => false, ); /** @@ -2022,14 +2023,18 @@ $result_wrap_class = false, $limit = null, $offset = null) { if ($types === true) { - $this->loadModule('Reverse', null, true); - $tableInfo = $this->reverse->tableInfo($result); - if (PEAR::isError($tableInfo)) { - return $tableInfo; - } - $types = array(); - foreach ($tableInfo as $field) { - $types[] = $field['mdb2type']; + if ($this->supports('result_introspection')) { + $this->loadModule('Reverse', null, true); + $tableInfo = $this->reverse->tableInfo($result); + if (PEAR::isError($tableInfo)) { + return $tableInfo; + } + $types = array(); + foreach ($tableInfo as $field) { + $types[] = $field['mdb2type']; + } + } else { + $types = null; } }

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