cvs: pear /DB_DataObject DataObject.php

From: Date: Wed, 01 Mar 2006 01:57:28 +0000
Subject: cvs: pear /DB_DataObject DataObject.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-38759@lists.php.net to get a copy of this message
alan_k Wed Mar 1 01:57:28 2006 UTC Modified files: /pear/DB_DataObject DataObject.php Log: fix bug #6928 - default to prefixing database name for mysql and mysqli when doing joins, (also typo fixes from last commit, and bump copyright year) http://cvs.php.net/viewcvs.cgi/pear/DB_DataObject/DataObject.php?r1=1.406&r2=1.407&diff_format=u Index: pear/DB_DataObject/DataObject.php diff -u pear/DB_DataObject/DataObject.php:1.406 pear/DB_DataObject/DataObject.php:1.407 --- pear/DB_DataObject/DataObject.php:1.406 Wed Mar 1 01:46:31 2006 +++ pear/DB_DataObject/DataObject.php Wed Mar 1 01:57:28 2006 @@ -13,9 +13,9 @@ * @category Database * @package DB_DataObject * @author Alan Knowles <alan@akbkhome.com> - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2006 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: DataObject.php,v 1.406 2006/03/01 01:46:31 alan_k Exp $ + * @version CVS: $Id: DataObject.php,v 1.407 2006/03/01 01:57:28 alan_k Exp $ * @link http://pear.php.net/package/DB_DataObject */ @@ -1641,7 +1641,7 @@ * @access public * @var array */ - var $_resultFields = false;; + var $_resultFields = false; /* ============================================================== */ @@ -3119,10 +3119,11 @@ $obj->__table ; - // as far as we know only mysql supports database prefixes.. + // as far as we know only mysql supports database prefixes.. + // prefixing the database name is now the default behaviour, + // as it enables joining mutiple columns from multiple databases... if ( in_array($DB->dsn['phptype'],array('mysql','mysqli')) && - ($obj->_database != $this->_database) && strlen($obj->_database) ) { @@ -3382,7 +3383,7 @@ global $_DB_DATAOBJECT; $ret = array(); $rf = ($this->_resultFields !== false) ? $this->_resultFields : - (isset($_DB_DATAOBJECT['RESULTFIELDS'][$this->_DB_resultid]) ? $_DB_DATAOBJECT['RESULTFIELDS'][$this->_DB_resultid] : false; + (isset($_DB_DATAOBJECT['RESULTFIELDS'][$this->_DB_resultid]) ? $_DB_DATAOBJECT['RESULTFIELDS'][$this->_DB_resultid] : false); $ar = ($rf !== false) ? array_merge($_DB_DATAOBJECT['RESULTFIELDS'][$this->_DB_resultid],$this->table()) : $this->table();

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