/** * 写操作,插入或者更新 * @param string $sql * @return int $result */ public function execute($sql) { try { $result = $this->_dbInstance->exec($sql); if (!$result) { throw new Exception("<br/>errorSQL:<b style='color:f00'>{$sql}</b><br/>\n"); } return $result; } catch (Exception $e) { exit("<br/>error<br/>" . $e->getMessage()); } return FALSE; }