Wrong parent call:
function __construct($id = false, $table = null, $ds = null)
{
if($_SERVER['HTTP_HOST'] == 'xxx' || $_SERVER
['HTTP_HOST'] ==
'www.xxx'){
$this-useDbConfig='production';
}
I added the following into my AppModel:
function __construct($id = false, $table = null, $ds = null)
{
if($_SERVER['HTTP_HOST'] == 'xxx' || $_SERVER['HTTP_HOST'] ==
'www.xxx'){
$this-useDbConfig='production';
}
Hi
Please can you point me again in the right direction?
I have host name switch in 3 places:
* webroot/index.php - to optionally change the location of the cake
libs, http://pastie.org/667873
* config/bootstrap.php - to override core settings such as debug
level, caching on/off etc,
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
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,