DB getRow() argument order
| From: | Daniel Convissor | Date: | Thu, 15 Jan 2004 07:34:40 +0000 |
| Subject: | DB getRow() argument order | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-25074@lists.php.net to get a copy of this message | ||
Hi Folks:
The current definition of getRow is as follows:
function &getRow($query,
$params = null,
$fetchmode = DB_FETCHMODE_DEFAULT)
{
But, in some long distant version of DB, the getRow() method (in
DB/common.php) had the $params and $fetchmode arguments reversed.
The current order was already in place when version 1.1 of the file was
committed to the current repository location nearly two years ago on
Jan 30 2002. I looked for earlier change information in php-src/pear but
couldn't find common.php.
This method has some convoluted compatibility checking which would be nice
to avoid. Also, getting rid of this checknig would allow the method to
behave like all the other get*() methods by allowing a scalar to be passed
to $params.
Chances are, it's safe to make this change, particularly if it's clearly
noted in the changelog.
Your thoughts, please?
--Dan
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
data intensive web and database programming
http://www.AnalysisAndSolutions.com/
4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409