Quantcast

Two database, different servers.. How to use and connect my model and controller?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Two database, different servers.. How to use and connect my model and controller?

lmiranda
Guys I have two database servers.

192.168.1.1 -- db1
192.168.1.2 -- db2

My database.php configuration is..

    var $default = array(
        'driver' => 'mysql',
        'persistent' => false,
        'host' => '192.168.1.1',
        'login' => 'one',
        'password' => 'one',
        'database' => 'one',
        'prefix' => '',
    );

    var $pdfproofing = array(
        'driver' => 'mysql',
        'persistent' => false,
        'host' => '192.168.10.2',
        'login' => 'two',
        'password' => 'two,
        'database' => 'two',
        'prefix' => '',
    );

How can I access $pdfproofing on my model and controller?
--
Louie Miranda ([hidden email])
http://www.louiemiranda.net

Quality Web Hosting - www.axishift.com
Pinoy Web Hosting, Web Hosting Philippines

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Louie Miranda (http://www.louiemiranda.net)
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Two database, different servers.. How to use and connect my model and controller?

Miles J

http://book.cakephp.org/view/71/Model-Attributes

var $useDbConfig = 'pdfproofing';
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Two database, different servers.. How to use and connect my model and controller?

lmiranda
Thanks a lot! Exactly what I am looking for.
--
Louie Miranda ([hidden email])
http://www.louiemiranda.net

Quality Web Hosting - www.axishift.com
Pinoy Web Hosting, Web Hosting Philippines


On Tue, Jun 23, 2009 at 4:50 PM, Miles J <[hidden email]> wrote:

http://book.cakephp.org/view/71/Model-Attributes

var $useDbConfig = 'pdfproofing';



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Louie Miranda (http://www.louiemiranda.net)
Loading...