On Oct 9, 2006, at 9:21 AM, RJT wrote:
> > Hi, > > I've just started using Cake and so far I'm quite impressed. I've > dabbled with a couple of PHP frameworks but this is the first that > I've > gone so far as to begin building a real-world application with. > > The app I'm building need to connect to a legacy database using ODBC. > The app itself stores its data in a MySQL database, and that was nice > and easy to configure, but now I want to create and use another > database connection inside one method of a QueriesController I've > written. First, why do you need ODBC to connect to mySQL? And secondly, you change db connection information in models, not controllers. You can define additional db connections in /app/config/ database.php (just copy the $default connection and rename it to be a new connection). From that point, in the model, you can set $useDbConfig = 'nameOfNewConnectionVar'; -- John --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~----------~----~----~----~------~----~------~--~---
