xoops forums

andrea_p

Just popping in
Posted on: 2004/4/14 11:54
andrea_p
andrea_p (Show more)
Just popping in
Posts: 2
Since: 2004/4/14
#1

Module that access on external database

I'm writing a module that must access to another database.
Now i connect and disconnect fron this database on every blocks/page but i think that this can be slow if there is more block on the same page. Where i can do my external connection and reuse this on every page/block?

Andrea

Mithrandir

XOOPS is my life!
Posted on: 2004/4/14 13:20
Mithrandir
Mithrandir (Show more)
XOOPS is my life!
Posts: 6320
Since: 2003/6/21
#2

Re: Module that access on external database

You could go to include/common.php and insert a line to include a custom header file (just to make it easier to upgrade)

In that custom header file, you can then make the connection to the 2nd database, which will then be available like $xoopsDB is.