diff --git a/addressbook/setup/upgrade.php b/addressbook/setup/upgrade.php index dfab9fea12..f75d5493b2 100644 --- a/addressbook/setup/upgrade.php +++ b/addressbook/setup/upgrade.php @@ -1,4 +1,16 @@ db->query("select * from addressbook"); - // create a couple of extra db objects for the two nested queries below + // create an extra db objects for the two nested queries below $db2 = $phpgw_setup->db; - $db3 = $phpgw_setup->db; while ( $phpgw_setup->db->nextrecord() ) { $fields["org_name"] = $phpgw->db->f("ab_company"); @@ -126,7 +137,7 @@ // insert extra data for this record into extra fields table while (list($name,$value) = each($extra)) { - $phpgw_setup->db3->query("INSERT INTO phpgw_addressbook_extra VALUES ('$id','" . $$fields["owner"] . "','" + $phpgw_setup->db2->query("INSERT INTO phpgw_addressbook_extra VALUES ('$id','" . $$fields["owner"] . "','" . addslashes($name) . "','" . addslashes($value) . "')",__LINE__,__FILE__); } }