當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ADOCOnnection類代碼示例

本文整理匯總了PHP中ADOCOnnection的典型用法代碼示例。如果您正苦於以下問題:PHP ADOCOnnection類的具體用法?PHP ADOCOnnection怎麽用?PHP ADOCOnnection使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了ADOCOnnection類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: StartTrans

 /**
 	Used together with StartTrans() to end a transaction. Monitors connection
 	for sql errors, and will commit or rollback as appropriate.
 	
 	@autoComplete if true, monitor sql errors and commit and rollback as appropriate, 
 	and if set to false force rollback even if no SQL error detected.
 	@returns true on commit, false on rollback.
 */
 function CompleteTrans($autoComplete = true)
 {
     if ($this->transOff > 1) {
         $this->transOff -= 1;
         return true;
     }
     $this->raiseErrorFn = $this->_oldRaiseFn;
     $this->transOff = 0;
     if ($this->_transOK && $autoComplete) {
         if (!$this->CommitTrans()) {
             $this->_transOK = false;
             if ($this->debug) {
                 ADOConnection::outp("Smart Commit failed");
             }
         } else {
             if ($this->debug) {
                 ADOConnection::outp("Smart Commit occurred");
             }
         }
     } else {
         $this->_transOK = false;
         $this->RollbackTrans();
         if ($this->debug) {
             ADOCOnnection::outp("Smart Rollback occurred");
         }
     }
     return $this->_transOK;
 }
開發者ID:dasatti,項目名稱:dashboard,代碼行數:36,代碼來源:adodb.inc.php

示例2: CompleteTrans

 function CompleteTrans($autoComplete = true)
 {
     if ($this->transOff > 1) {
         $this->transOff -= 1;
         return true;
     }
     $this->transOff = 0;
     if ($this->transaction_status && $autoComplete) {
         if (!$this->CommitTrans()) {
             $this->transaction_status = false;
             if ($this->debug) {
                 ADOConnection::outp("Smart Commit failed");
             }
         } else {
             if ($this->debug) {
                 ADOConnection::outp("Smart Commit occurred");
             }
         }
     } else {
         $this->RollbackTrans();
         if ($this->debug) {
             ADOCOnnection::outp("Smart Rollback occurred");
         }
     }
     return $this->transaction_status;
 }
開發者ID:cahilbey,項目名稱:VL-AWS-Test,代碼行數:26,代碼來源:ewmysql12.php


注:本文中的ADOCOnnection類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。