Have both configs in database.php, add AppModel, in it's constructor set appropriate db config name to $this->useDbConfig and then call parent constructor. Copy constructor arguments for AppModel from Model and don't forget to pass them all to parent::__constructor();
On Sep 9, 3:21 pm, CapeTownGuy <[email protected]> wrote: > Hi, is there some instructions on how to get Cake to use an > alternative Database config, based on the Debug level, I currently use > the following code inside my core.php to dynamically change between > debug levels, based on whether I'm on my localhost, or on my > production server... I tried the same technique inside database.php, > but it doesn't seem to work. > > if($_SERVER['HTTP_HOST'] == 'xxx.com' || $_SERVER['HTTP_HOST'] == > 'www.xxx.com'){ > Configure::write('debug', 0); > }else{ > Configure::write('debug', 2); > } --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
