in reply to Re: Re: CDBI and multiple databases
in thread CDBI and multiple databases

I'm not aware of any downsides to having all of your tables in one database, especially if you are already using them together.

If multiple databases in MySQL are similar to multiple schemas in Oracle (i.e. you can just access tables by saying db_name.table_name), you may be able to convince Class::DBI to use that syntax. Try setting the table name in one of your classes to that fully-qualified syntax and see what happens.

  • Comment on Re: Re: Re: CDBI and multiple databases

Replies are listed 'Best First'.
Re: Re: Re: Re: CDBI and multiple databases
by water (Deacon) on Mar 23, 2004 at 01:47 UTC
    A thousand ++'s, perrin. Hadn't thought of the obvious -- have all CDBI classes point at one database (hence they all get the same Ima::DBI handle), then use fully qualified names in the table statement. IT WORKS.

    This lets us have our cake and eat it too -- simple txns (mpeppler's comment was right on -- I didn't really like the app-level txn rollback handling trick) and different DBs. Hurrah!

    Many many thanks, all