Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [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

Posty w temacie


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: 15.10.2025 - 14:44