public function select($options = array()) { static $_cache = array(); $sql = $this->buildSelectSql($options); if ($options['cache'] !== FALSE) { $key = is_string($cache['cache_key']) ? $cache['cache_key'] : md5($sql); if (isset($_cache[$key])) { return $_cache[$key]; } } $result = DB::getall($sql); if ($options['cache'] !== FALSE && !isset($_cache[$key])) { $_cache[$key] = $result; } return $result; }
public function query($sql) { return DB::getall($sql); }