Esempio n. 1
0
 /**
  * Open a connection and Initiates a transaction
  * @param $database Name of the database (an INI file).
  */
 public static function open($database)
 {
     if (!isset(self::$counter)) {
         self::$counter = 0;
     } else {
         self::$counter++;
     }
     self::$conn[self::$counter] = TConnection::open($database);
     self::$database[self::$counter] = $database;
     $driver = self::$conn[self::$counter]->getAttribute(PDO::ATTR_DRIVER_NAME);
     if ($driver !== 'dblib') {
         // begins transaction
         self::$conn[self::$counter]->beginTransaction();
     }
     // turn OFF the log
     self::$logger[self::$counter] = NULL;
 }