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: Brian Johnson
Subject: Re: [Phpgroupware-developers] Couple of table setup questions
Date: Mon, 18 Aug 2003 21:12:00 +0000

Thanks .. seems my biggest problem was mixing use of oProc-> and db->

Revised setup files for phpgwapi sent to jarg for testing



Ralf Becker (address@hidden) wrote:
>
>
>
>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("test1n");
>>                 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("test2n");
>>                 }
>>                 print_r("test3n");
>>
>>
>>
>> _______________________________________________
>> 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
>
>
>
>_______________________________________________
>Phpgroupware-developers mailing list
>address@hidden
>http://mail.gnu.org/mailman/listinfo/phpgroupware-developers
>

--
Brian Johnson
* This is where my witty signature line would be if I bothered to edit this 
line :) *






reply via email to

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