------------------------
* 鐢ㄤ簬闈炶嚜鍔ㄦ彁浜ょ姸鎬佷笅闈㈢殑鏌ヨ鎻愪氦
+----------------------------------------------------------
* @access public
+----------------------------------------------------------
* @return boolen
+----------------------------------------------------------
* @throws ThinkExecption
+----------------------------------------------------------
*/
public function commit()
{
if ($this->transTimes > 0) {
$result = pg_exec($this->_linkID,'end;');
if(!$result){
throw_exception($this->error());
return false;
}
$this->transTimes = 0;
}
return true;
}
/**
+----------------------------------------------------------
* 浜嬪姟鍥炴粴
+----------------------------------------------------------
* @access public
+----------------------------------------------------------
* @return boolen
+----------------------------------------------------------
* @throws ThinkExecption
+----------------------------------------------------------
*/
public function rollback()
{
if ($this->transTimes > 0) {
$result = pg_exec($this->_linkID,'abort;');
if(!$result){
throw_exception($this->error());
return false;
}
$this->transTimes = 0;
}
return true;
}
/**
+----------------------------------------------------------
* 鑾峰緱涓嬩竴鏉℃煡璇㈢粨鏋?绠鏄撴暟鎹泦鑾峰彇鏂规硶
* 鏌ヨ缁撴灉鏀惧埌 result 鏁扮粍涓?
+----------------------------------------------------------
* @access public
+---------------
上一篇:
DbPdo.class.php
下一篇:
行走梵净山之(三)一世一遇,即是懂得