For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > July 2005 > DB_DataObjec: Using two databases









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author DB_DataObjec: Using two databases
mel

2005-07-24, 8:39 pm

Hi all,

I'm using DD_DataObject to automatically create data object codes. My
problem is as follows:

1) I can't generate the codes by using database_* in the configuration
option. The createTable.php script spits out the following error:

Fatal error: Undefined class name 'db
c:\php\pear\DB\DataObject\Generator.php on line 113

The config file are as follows:

[DB_DataObject]

database_mysql = mysql://user:passwords@localhost/database
database_oracle = oci8://user:password@sid
schema_location_mysql = C:/Inetpub/wwwroot/project/MyDataObjects
schema_location_oracle = C:/Inetpub/wwwroot/project/OraDataObjects
class_location_mysql = C:/Inetpub/wwwroot/project/MyDataObjects
class_location_oracle = C:/Inetpub/wwwroot/project/OraDataObjects
class_prefix_mysql = My_
class_prefix_oracle = Ora_
require_prefix_mysql = MyDataObjects/
require_prefix_oracle = OraDataObjects/
debug = 3

2. Assuming that I managed to get the above problem solved, how then do I
get about in using DDO to reference two databases? What I mean is, at one
portion of my code, I need to retrieve values from the Oracle database,
and then insert them to the MySQL database. The table names are different.

Regards,

--mel
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com