[UPDATED] Query improved for first blocks time
This commit is contained in:
parent
629dfb58ed
commit
9ccc3403f8
@ -30,9 +30,7 @@ class Statistics extends Base {
|
||||
$this->debug->append("STA " . __METHOD__, 4);
|
||||
if ($data = $this->memcache->get(__FUNCTION__)) return $data;
|
||||
$stmt = $this->mysqli->prepare("
|
||||
SELECT
|
||||
IFNULL(time, 0) AS time FROM " . $this->block->getTableName() . "
|
||||
ORDER BY id ASC LIMIT 1");
|
||||
SELECT IFNULL(MIN(time), 0) AS time FROM " . $this->block->getTableName());
|
||||
if ($this->checkStmt($stmt) && $stmt->execute() && $result = $stmt->get_result())
|
||||
return $result->fetch_object()->time;
|
||||
return false;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user