コード例 #1
0
 /**
  * Use the TYPO3 mysli connection when available (above 6.0.0)
  *
  * @global t3lib_db $TYPO3_DB
  * @return boolean
  */
 public function connect()
 {
     /* @var $TYPO3_DB t3lib_db */
     global $TYPO3_DB;
     if (method_exists($TYPO3_DB, 'getDatabaseHandle')) {
         $handle = $TYPO3_DB->getDatabaseHandle();
         if ($handle instanceof mysqli) {
             $this->dbcon = $handle;
             $this->connected = true;
             $this->sharedConnection = true;
             return true;
         }
     }
     return parent::connect();
 }
コード例 #2
0
 /**
  * Establishes connection to database (does not check for DB sanity)
  */
 public function connect()
 {
     parent::connect();
     $this->profiler = new phpMyProfiler($this->dbcon, $this->profile_log);
 }