phpgroupware-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Phpgroupware-developers] Couple of table setup questions


From: Ralf Becker
Subject: Re: [Phpgroupware-developers] Couple of table setup questions
Date: Mon, 18 Aug 2003 22:54:58 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030626



Brian Johnson wrote:
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

Look at the setup(3) docu, its in the doc dir of phpgwapi

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


--
----------------------------------------------------------------------
Ralf Becker
digital ROCK, Becker & Macht GbR            Telefon +49 (631) 31657-51
Leibnizstraße 17                            Telefax +49 (631) 31657-52
D-67663 Kaiserslautern                 EMail address@hidden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]