示例#1
0
 /**
  */
 function __construct($postgresql)
 {
     global $logger;
     $this->logger = $logger;
     $this->db = \Rss\Util\Db\PostgreSQL::getPDO($postgresql);
     $this->feedsselect = $this->db->prepare($this->feedsselect);
     $this->feedsupdate = $this->db->prepare($this->feedsupdate);
 }
示例#2
0
 /**
  */
 function __construct($postgresql)
 {
     global $logger;
     $this->logger = $logger;
     // Connect to remote cache database
     $this->cacheremote = \Rss\Util\Db\PostgreSQL::getPDO($postgresql);
     $this->cacheremoteinsert = $this->cacheremote->prepare($this->cacheremoteinsert);
     $this->cachelocal = $this->cache_local_connect();
     $this->cache_local_copy();
 }
示例#3
0
 /**
  */
 function __construct($postgresql)
 {
     global $logger;
     $this->logger = $logger;
     $this->db = \Rss\Util\Db\PostgreSQL::getPDO($postgresql);
     $this->xpath = $this->db->prepare($this->xpath);
     $this->insert = $this->db->prepare($this->insert);
     $this->update = $this->db->prepare($this->update);
     $this->xpfailed = $this->db->prepare($this->xpfailed);
     $this->db->exec($this->clean);
 }
 /**
  *
  * @param object $logger        	
  */
 function __construct($postgresql)
 {
     try {
         global $logger;
         $this->logger = $logger;
         $this->db = \Rss\Util\Db\PostgreSQL::getPDO($postgresql);
         $this->qryupsert = $this->db->prepare($this->qryupsert);
     } catch (\Exception $e) {
         $m = 'Error connecting to PostgreSQL ' . $e->getCode() . ' ' . $e->getMessage() . ' ' . $e->getFile();
         $this->logger->logError($m);
     }
 }