Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [ZendFramework] Dwie bazy danych.
istrd
post
Post #1





Grupa: Zarejestrowani
Postów: 90
Pomógł: 0
Dołączył: 3.12.2009

Ostrzeżenie: (0%)
-----


Czy można korzystać z dwóch baz danych? Jeśli tak to jak skonfigurować, żebym z obu mógł korzystać w całej aplikacji oraz korzystać Application_Model_DbTable dla obu baz.
Na razie mam skonfigurowaną jedna bazę w application.ini

  1. [production]
  2. phpSettings.display_startup_errors = 1
  3. phpSettings.display_errors = 1
  4. includePaths.library = APPLICATION_PATH "/../library"
  5. bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
  6. bootstrap.class = "Bootstrap"
  7. appnamespace = "Application"
  8. resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
  9. resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts"
  10. resources.view[] = ""
  11. autoloadernamespaces[] = "My"
  12. pluginpaths.My_Application_Resource = APPLICATION_PATH "/../library/My/Application/Resource"
  13.  
  14. //baza danych
  15.  
  16. resources.db.adapter = "pdo_mysql"
  17. resources.db.params.host = "localhost"
  18. resources.db.params.username = "xxx"
  19. resources.db.params.password = "xxx"
  20. resources.db.params.dbname = "xxx"
  21. resources.db.params.charset = "utf8"
  22. resources.db.isDefaultTableAdapter = true
  23.  
  24. [staging : production]
  25. phpSettings.display_startup_errors = 1
  26. phpSettings.display_errors = 1
  27.  
  28. [testing : production]
  29. phpSettings.display_startup_errors = 1
  30. phpSettings.display_errors = 1
  31.  
  32. [development : production]
  33. phpSettings.display_startup_errors = 1
  34. phpSettings.display_errors = 1
Go to the top of the page
+Quote Post
darko
post
Post #2





Grupa: Zarejestrowani
Postów: 2 885
Pomógł: 463
Dołączył: 3.10.2009
Skąd: Wrocław

Ostrzeżenie: (0%)
-----


http://stackoverflow.com/questions/2939086...tiple-databases
http://www.amazium.com/blog/using-differen...-zend-framework
Go to the top of the page
+Quote Post
batman
post
Post #3





Grupa: Moderatorzy
Postów: 2 921
Pomógł: 269
Dołączył: 11.08.2005
Skąd: 127.0.0.1




Korzystanie z kilku baz w jednym projekcie
Go to the top of the page
+Quote Post
istrd
post
Post #4





Grupa: Zarejestrowani
Postów: 90
Pomógł: 0
Dołączył: 3.12.2009

Ostrzeżenie: (0%)
-----


Cytat(batman @ 17.07.2012, 15:33:54 ) *

http://mpie.nl/zend-framework/using-differ...rk-multidb.html Najlepsza instrukcja dzięki niej dałem radę. Pozdro

Ten post edytował istrd 17.07.2012, 19:46:32
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 22.08.2025 - 16:22