This is how I switch configuration
class DATABASE_CONFIG
{
var $default = array('driver' => 'mysql',
'connect' =>
'mysql_connect',
'host' =>
'mysql50.hub.org',
'login' =>
'803_swappitto',
'password' =>
'swappitto',
'database' =>
'803_swappitto',
'prefix' => '');
var $dev = array('driver' => 'mysql',
'connect' =>
'mysql_connect',
'host' =>
'localhost',
'login' =>
'swappitto',
'password' =>
'swappitto',
'database' =>
'swappitto',
'prefix' => '');
var $test = array('driver' => 'mysql',
'connect' =>
'mysql_connect',
'host' => 'localhost',
'login' => 'user',
'password' =>
'password',
'database' =>
'project_name-test',
'prefix' => '');
function DATABASE_CONFIG()
{
if (0 != DEBUG)
{
$this->default = $this->dev;
}
}
}
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
