Home » Database » DB_DataObject » Bug #3302
joinAdd in CVS not calling $obj->_connect()
Details
| Submitted | 2005-01-26 16:30 UTC |
|---|---|
| From | mcraig at leadehealth dot com |
| Assigned | alan_k |
| Status | Closed |
| Package | DB_DataObject |
| PHP Version | 4.3.9 |
| OS | linux |
| Roadmaps | (Not assigned) |
Comments
[2005-01-26 16:30 UTC] mcraig at leadehealth dot com
Description:
------------
applies to cvs copy 1.321 of DataObject.php
When calling joinAdd with arg[0] as an array of setting so that joinAdd dynamically creates the object ($obj) it seems that $obj->_connect() never gets called.
I got queries like this. "SELECT * FROM table1 INNER JOIN table2 ON .table2.id = maindb.table1.twoid WHERE table1.id=40"
even though table1 and table2 are in the same database.
var_dump($obj) right before line 2844 shows there is no database connection info present.
Reproduce code:
---------------
This code seems to always execute.
// add database prefix if they are different databases if (($obj->_database != $this->_database) && strlen($this->_database )) {
$table = ($quoteIdentifiers ? $DB->quoteIdentifier($this->_database) : $this->_database) . '.' . $table;
}