Posted by Jonnel
2014-03-31

Hi Tom, I created two Address Books with different fields and database, my question is would it be possible to merge the two using the same logins? or rather make a link on the menu pointing to another address book.
Posted by Tom
2014-03-31

Hi Jonnel

>would it be possible to merge the two using the same logins?

It's possible if you put both of them in the same database. To put them in the same database, first you need to rename the table names so that they don't conflict.
Open web/codelib/cfg/config.table_name.inc.php You will find the table name definitions like this:
define( 'TBL_STAFF', TBL_PREFIX . 'staff' );
define( 'TBL_ADDRESSES', TBL_PREFIX . 'addresses' );
Change it to
define( 'TBL_STAFF', 'tbl_shared_staff' );
define( 'TBL_ADDRESSES', tbl_1_addresses' );
You also need to change the table names in the database using phpMyAdmin or some kind of database management program.
On the other copy of address book script, change the table name definitions like this:
define( 'TBL_STAFF', 'tbl_shared_staff' );
define( 'TBL_ADDRESSES', tbl_2_addresses' );
Notice that TBL_STAFF has the same table name tbl_shared_staff. Again don't forget to change the table names in the database accordingly. Now you are ready to merge two of them. Copy all the tables into one database and modify the database settings in config/config.db.inc.php accordingly.