本文整理汇总了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;未经允许,请勿转载。 |
请发表评论