Re: Switching useDbConfig variable

2008-02-15 Thread Seandy
english please... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For mo

Re: Switching useDbConfig variable

2008-02-14 Thread pamp_php
Aproveitando o assunto ... Meu problema é o seguinte: Tenho um método no meu MODEL, onde: 1) Através da conexão default, crio um novo banco de dados (o nome do banco de dados é passado dinâmicamente para o meu método); 2) Atribuo privilégios para um usuário, que também

Re: Switching useDbConfig variable

2008-02-08 Thread Corie
Oh, nevermind. I just reread. I guess I was simply trying to set up the if else inside the database_config class and set the $default accordingly. On Feb 8, 1:37 pm, Corie <[EMAIL PROTECTED]> wrote: > That actually does look like a better solution, as I was also trying > to figure out how to make

Re: Switching useDbConfig variable

2008-02-08 Thread Corie
That actually does look like a better solution, as I was also trying to figure out how to make it switch for all Models. I'm a bit new to OOP, how do you set up your /config/database.php file? You have to put the conditionals in a function right? On Feb 8, 11:32 am, grigri <[EMAIL PROTECTED]> wr

Re: Switching useDbConfig variable

2008-02-08 Thread grigri
Interesting... I do it a completely different way. I have 2 database config files : database.dev.php and database.live.php, each containing a full DATABASE_CONFIG class with my configurations (default, test, and whatever else I need for the app). Then, in /config/database.php, I have this: if (e

Switching useDbConfig variable

2008-02-08 Thread Corie
I'm running the same cake app on two different servers, development and production. I want to change the database config that's used depending on the server. I've got the following set up now. /config/database.php class DATABASE_CONFIG { var $development = array( 'driver'