Guest User

Untitled

a guest
Dec 10th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. resources.db.adapter = PDO_MYSQL
  2. resources.db.params.host = localhost
  3. resources.db.params.username = admin
  4. resources.db.params.password = 12345
  5. resources.db.params.dbname = daedu
  6. resources.db.params.charset = utf8
  7.  
  8. resources.db.adapter = PDO_PGSQL
  9. resources.db.params.host = localhost
  10. resources.db.params.port = 5432
  11. resources.db.params.username = postgres
  12. resources.db.params.password = 12345
  13. resources.db.params.dbname = postgres
  14. resources.db.params.charset = utf8
  15.  
  16. class Application_Model_DbTable_Postrgres extends Zend_Db_Table_Abstract
  17. {
  18. protected $_name = 'postgres';
  19.  
  20. public function insert(){
  21. $data = array(
  22. 'name' => "dan"
  23. );
  24.  
  25. $this->insert($data);
  26. }
  27. }
  28.  
  29. $f = new Application_Model_DbTable_Postrgres();
  30. $f->insert();
  31.  
  32. resources.db.adapter = PDO_PGSQL
  33.  
  34. // Define application environment
  35. defined('APPLICATION_ENV')
  36. || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'development'));
Add Comment
Please, Sign In to add comment