I need to add some default records to the setup of addressbook and am trying to
determine the functions of default_records.inc.php, setup.inc.php,
tables_baseline.inc.php, tables_current.inc.php, and tables_update.inc.php
Could someone give me a summary of thier function?
Does the default_records.inc.php get run only when it is a new install or does
it
also run when it is an update?
Without analysing the SQL (it works when run in a postgresql client), could
someone
suggest why with this code never goes into the while loop?
$db2 = $GLOBALS['phpgw_setup']->db;
// migrate existing data to phpgw_contact_person
$GLOBALS['phpgw_setup']->db->query("SELECT id, owner, access,
cat_id, '1' AS contact_type_id FROM phpgw_addressbook ORDER BY id");
print_r("test1\n");
while ($GLOBALS['phpgw_setup']->oProc->next_record())
{
$db2->query("INSERT INTO phpgw_contact
(owner,access,cat_id,contact_type_id,ab_id) VALUES ("
. $GLOBALS['phpgw_setup']->oProc->f('owner')
. "," .
($GLOBALS['phpgw_setup']->oProc->f('access')?"'".$GLOBALS['phpgw_setup']->oProc->f('access')."'":"null")
. "," .
($GLOBALS['phpgw_setup']->oProc->f('cat_id')?"'".$GLOBALS['phpgw_setup']->oProc->f('cat_id')."'":"null")
. "," .
$GLOBALS['phpgw_setup']->oProc->f('contact_type_id')
. "," . $GLOBALS['phpgw_setup']->oProc->f('id')
. ')');
print_r("test2\n");
}
print_r("test3\n");
_______________________________________________
Phpgroupware-developers mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/phpgroupware-developers