cvs: pear /MDB2 MDB2.php

From: Date: Thu, 08 Jun 2006 20:36:12 +0000
Subject: cvs: pear /MDB2 MDB2.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-40573@lists.php.net to get a copy of this message
lsmith Thu Jun 8 20:36:12 2006 UTC Modified files: /pear/MDB2 MDB2.php Log: - phpdoc fixes - added reverse parameter to getColumnNames() http://cvs.php.net/viewcvs.cgi/pear/MDB2/MDB2.php?r1=1.213&r2=1.214&diff_format=u Index: pear/MDB2/MDB2.php diff -u pear/MDB2/MDB2.php:1.213 pear/MDB2/MDB2.php:1.214 --- pear/MDB2/MDB2.php:1.213 Mon Jun 5 07:30:10 2006 +++ pear/MDB2/MDB2.php Thu Jun 8 20:36:12 2006 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@pooteeweet.org> | // +----------------------------------------------------------------------+ // -// $Id: MDB2.php,v 1.213 2006/06/05 07:30:10 lsmith Exp $ +// $Id: MDB2.php,v 1.214 2006/06/08 20:36:12 lsmith Exp $ // /** @@ -3297,17 +3297,16 @@ * Retrieve the names of columns returned by the DBMS in a query result or * from the cache. * - * @return mixed associative array variable - * that holds the names of columns. The indexes of the array are - * the column names mapped to lower case and the values are the - * respective numbers of the columns starting from 0. Some DBMS may - * not return any columns when the result set does not contain any - * rows. - * a MDB2 error on failure + * @param bool If set to true the values are the column names, + * otherwise the names of the columns are the keys. + * @return mixed Array variable that holds the names of columns or an + * MDB2 error on failure. + * Some DBMS may not return any columns when the result set + * does not contain any rows. * * @access public */ - function getColumnNames() + function getColumnNames($reverse = false) { if (!isset($this->column_names)) { $result = $this->_getColumnNames(); @@ -3316,6 +3315,9 @@ } $this->column_names = $result; } + if ($reverse) { + return array_reverse($this->column_names); + } return $this->column_names; } // }}} @@ -3325,13 +3327,10 @@ /** * Retrieve the names of columns returned by the DBMS in a query result. * - * @return mixed associative array variable - * that holds the names of columns. The indexes of the array are - * the column names mapped to lower case and the values are the - * respective numbers of the columns starting from 0. Some DBMS may - * not return any columns when the result set does not contain any - * rows. - * a MDB2 error on failure + * @return mixed Array variable that holds the names of columns as keys + * or an MDB2 error on failure. + * Some DBMS may not return any columns when the result set + * does not contain any rows. * * @access private */

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