/** * @return PDOStatement */ public function execute($sql, $params = NULL, $flag = true) { if (DEBUG) { CxBug::sql($sql, $params); } $db = $this->prepare($sql); $result = is_null($params) ? $db->execute() : $db->execute($params); if (false !== $result) { return $db; } if (DEBUG) { $result = $db->errorInfo(); if (empty($result)) { $result = 'sql execute error!'; } else { $result = $result[2]; } throw new Exception($result); } }
private static function _clear() { self::$sql = null; self::$log = null; self::$start = null; self::$time = null; self::$server = null; self::$exception = null; self::$session = null; //self::$show; //self::$key; }