public function startTrans() { $this->initConnect(true); if (!$this->_linkID) { return false; } //数据rollback 支持 if ($this->transTimes == 0) { mysql_query('START TRANSACTION', $this->_linkID); } $this->transTimes++; return; }