function query($sql) { $db = new bDataStore(); return $db->query($sql); }
function query($sql, $start = 0, $limit = NULL) { $this->data = array(); $this->sql = $sql; $this->cachefile = md5($sql) . '.php'; $subdir = substr($this->cachefile, 0, 1) . '/'; if ($this->checkcache()) { include $this->cache . $subdir . $this->cachefile; $this->data = unserialize(stripslashes($data)); $this->num = count($this->data); } else { if (file_exists($this->cache . $subdir . $this->cachefile)) { @unlink($this->cache . $subdir . $this->cachefile); } $this->result = parent::query($sql, $this->connect) or $this->error(); } return $this; }