That will not work for shell ... but maybe you do not need
Cheers

On Nov 22, 12:06 am, "Ricardo Valfreixo" <[EMAIL PROTECTED]> wrote:
> Ok, I ask and also reply..
>
> directly on the app/config/database.php
>
> something like:
>
> classe DATABASE_CONFIG
> {
>     var $default = NULL;
>
>     var $dev = array(
>         //your dev settings
>     );
>     var $prod = array(
>         //your prod settings
>     );
>
>     function __construct()
>     {
>         if(isset($_SERVER['SERVER_NAME'])
>         {
>             if($_SERVER['SERVER_NAME'] == <your server url>)
>             {
>                 $this->default = $this->prod;
>             }
>             else
>             {
>                 $this->default = $this->dev;
>             }
>         }
>     }
>
> }
>
> et voilá
>
> @teknoid
>
> This way I don't need to worry about overwriting all the files. I can simply
> delete all and reupload the entire source.
>
> Zen
>
> On Fri, Nov 21, 2008 at 10:45 PM, Ricardo Valfreixo <[EMAIL PROTECTED]>wrote:
>
> > Hello once more. I'm a real pain, I know..
>
> > I have two database settings. one $default and one $production. How can I
> > make the code sensitive to the url? I have the php magic system variables
> > which I can use, But were, in the code, should I put the "selector"?
>
> > Thank you
>
> > Zen
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to