On Tue, Oct 6, 2009 at 12:38 PM, p_W <[email protected]> wrote: > > At my company we have a large Oracle DB that stores the information > for all our employees and users. The app I am writing uses a MSSQL db > and also has a 'users' table, as we want to store the information for > the users of our app in a different way than the information is stored > in the Oracle db. When the user browses to the app, their employee id > is pulled from the $_SERVER['HTTP_REMOTE_USER'] variable, and we want > to pull some basic information about the user (name, status, etc) from > the Oracle db and store it in the MSSQL table. > > How would you advise setting up the connection to the oracle db? The > 'user' model is hooked to the MSSQL db, and we only want to use the > oracle connection to get a bit of info and then it won't be used again > for that user. Should I set the oracle connection up in database.php > and another source and use 'var $useDbConfig = 'oracle'' till I don't > need the oracle connection anymore, or just use old-fashioned > odbc_connect() functions in the user model's 'get_info_from_oracle' > function?
Use Model::setDataSource() http://api.cakephp.org/class/model#method-ModelsetDataSource --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
