[ic] MYSQL/IC: Connecting to a second database

Dan Browning interchange-users@interchange.redhat.com
Tue Feb 26 13:35:00 2002


At 11:58 AM 2/26/2002 -0600, you wrote:
>Problem:  Need to connect to a second database within IC pages.
>
>I've been searching through the documentation and seen some related 
>messages, but nothing exactly on this topic.  We need to connect to a 
>second database within IC.  To explain further, we have a corporate master 
>products database (mpd).  Currently, we have to get a feed of products 
>from this database, and then import it into our IC MYSQL database.  We 
>would like to just make queries directly on the mpd and then  continue to 
>use our MYSQL database for everything else.  (We need to eliminate the feed.)
>
>For example, within the flypage.html, how would we do this? Or would we 
>have to set up a global sub and call it from the page?  I've seen things 
>such as:  dbi:mysql:database_name;host=111.111.111.111 --
>
>I need a shove here.  Thanks
>
>Michelle

It is part of the default feature set (and one of the coolest things about 
IC, IMHO).  Just change the relative dbconf/ files (manually typing in the 
dbi, or setting a second Variable to substitute).  That is one reason why 
"table" and "database" are semi-synonymous in IC.


+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Dan Browning, Sr. Tech Consultant
| Kavod Technologies, 1498 SE Tech Center Pl Ste 170
| Vancouver, WA 98683  <dan.browning@kavod.com>
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Anthony's Law of Force:
         Don't force it; get a larger hammer.