It seems like php5 differ from php4 when one needs a second db-object inside a 
db->next_record()-loop.

In php4 one can do like this:

$this->db       = $GLOBALS['phpgw']->db;

$this->db2      = $this->db;


While for php5 one has to alter to:

$this->db            = $GLOBALS['phpgw']->db;
$this->db2           = CreateObject('phpgwapi.db');
$this->db2->Host     = $GLOBALS['phpgw_info']['server']['db_host'];
$this->db2->Type     = $GLOBALS['phpgw_info']['server']['db_type'];
$this->db2->Database = $GLOBALS['phpgw_info']['server']['db_name'];
$this->db2->User     = $GLOBALS['phpgw_info']['server']['db_user'];
$this->db2->Password = $GLOBALS['phpgw_info']['server']['db_pass'];

The db initialization could be moved to a function to enable this:
 $this->db2 = $GLOBALS['phpgw']->new_db;
 
Any thoughts?

Regards

Sigurd
_______________________________________________
Phpgroupware-developers mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/phpgroupware-developers

Reply via email to