Beispiel #1
0
 public function Commit()
 {
     self::$TRANSACTION_DEPTH--;
     if (self::$TRANSACTION_DEPTH < 0) {
         self::$TRANSACTION_DEPTH = 0;
     }
     if (empty(self::$TRANSACTION_DEPTH)) {
         $this->Query('COMMIT');
     }
 }
Beispiel #2
0
 public static function init()
 {
     if (!self::$ready) {
         $db_list = cfg('database', 'connect');
         self::$ready = true;
         if (any($db_list)) {
             foreach ($db_list as $db_ident) {
                 $cfg = cfg('database', 'list', $db_ident);
                 self::connect($cfg, $db_ident);
             }
         }
     }
 }