1083
1083
$name = $this->GetTableName($resolution, $postfix);
1086
1091
for ($i = 0; $i < $items; $i++)
1087
1092
$query .= ", `min" . $i . "` DOUBLE, `max" . $i . "` DOUBLE, `mean" . $i . "` DOUBLE";
1089
1094
/*, `duration` INT, `complete` BOOL,*/
1090
if (!mysql_query("CREATE TABLE IF NOT EXISTS `$name` (`time` DATETIME PRIMARY KEY, `n` BIGINT, `missing` INT" . $query . ") ENGINE = $ADEI_CACHE_ENGINE COMPRESSION=\"$ADEI_CACHE_COMPRESSION\"", $this->dbh)) {
1095
if (!mysql_query("CREATE TABLE IF NOT EXISTS `$name` (`time` DATETIME PRIMARY KEY, `n` BIGINT, `missing` INT" . $query . ") ENGINE = $ADEI_CACHE_ENGINE $compression", $this->dbh)) {
1091
1096
throw new ADEIException(translate("Unable to create cache table (resolution: %s, items: 3 + 3 * %s), error: %s", $resolution, $items, mysql_error($this->dbh)));