Why cake or php involved with this operation?
On Wed, Oct 19, 2011 at 4:52 PM, Ernesto <[email protected]> wrote:
> Hi all.
>
> i have a simple app wich uses 2 different DBs.
> The second DB is used just to import data on a daily basis, no writes.
>
> i have 2 options:
>
> 1 - switch DB on-the-fly in my Order::import function
>
> function import() {
> $this->useDbConfig = "external_db";
> $this->query("SELECT * FROM blah");
> $this->useDbConfig = "default";
> $this->saveAll(/* still to code */);
> }
>
> 2 - add a new Model called "Import" with a different useDbConfig.
>
> wich one is best in your opinion? i don't want to break MVC.
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> [email protected] For more options, visit this group
> at http://groups.google.com/group/cake-php
>
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php