public function __construct() { $helper = new DbHelper(); $this->db = $helper->getConnector(); $this->tableMsg = DB_PREFIX . '_cache_msg'; $this->tableRetry = DB_PREFIX . '_cache_retry'; }
/** * @throws ApiException */ public function __construct() { $helper = new DbHelper(); $this->db = $helper->getConnector(); $this->createTime = time(); $this->table = DB_PREFIX . '_cache_oauth'; }
/** * @throws PDOException */ public function __construct() { try { $helper = new \wlight\util\DbHelper(); $this->sql = $helper->getConnector(); } catch (\PDOException $e) { throw $e; } }
/** * @throws PDOException */ public function __construct() { try { $helper = new \wlight\util\DbHelper(); $this->db = $helper->getConnector(); $this->tag = DB_PREFIX . '_statis_tag'; $this->message = DB_PREFIX . '_statis_message'; } catch (\PDOException $e) { $this->sql = null; throw $e; } }
public static function resetMysql() { $cacheMsg = self::$cacheMsg; $cacheRetry = self::$cacheRetry; $cacheOauth = self::$cacheOauth; $helper = new DbHelper(); $helper->set(DbHelper::TYPE, 'mysql'); $link = $helper->getConnector(); $link->exec("DELETE FROM `{$cacheMsg}` WHERE 1"); $link->exec("DELETE FROM `{$cacheRetry}` WHERE 1"); $link->exec("DELETE FROM `{$cacheOauth}` WHERE 1"); }