2
class CACHEData implements Iterator {
10
function __construct(CACHEDB &$cache, $table, $from, $to) {
11
$this->cache = &$cache;
12
// $this->query = "SELECT * FROM `$table` WHERE `time` BETWEEN FROM_UNIXTIME($from) AND FROM_UNIXTIME($to) ORDER BY `time` ASC";
13
$this->query = "SELECT * FROM `$table` WHERE ((`time` >= FROM_UNIXTIME($from)) AND (`time` < FROM_UNIXTIME($to))) ORDER BY `time` ASC";
18
$this->res = mysql_query($this->query, $this->cache->dbh);
20
throw new ADEIException(translate("Select request to CACHE is failed [%s]", $this->query));
33
$this->row = mysql_fetch_row($this->res);
34
if ($this->row) $this->key = strtotime($this->row[0]);
37
mysql_free_result($this->res);
42
return $this->row?true:false;
b'\\ No newline at end of file'