Guest User

Untitled

a guest
Jun 4th, 2018
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. <?php
  2.  
  3. require_once(RL_LIB_DIR . '/extras/PostgreSQLProvider.class.php');
  4.  
  5. class Database extends PostgreSQLProvider {
  6.  
  7. protected function connectRead () {
  8.  
  9. static $conn;
  10.  
  11. if ($conn === null) {
  12.  
  13. $conn = pg_connect('user=werd password=DBPASS dbname=werd');
  14.  
  15. }
  16.  
  17. return $conn;
  18.  
  19. }
  20.  
  21. protected function connectWrite () {
  22.  
  23. return $this->connectRead();
  24.  
  25. }
  26.  
  27. }
Add Comment
Please, Sign In to add comment