don't run stupid queries
This commit is contained in:
parent
d3cd0e13f6
commit
fdecf39f93
1 changed files with 1 additions and 1 deletions
|
@ -327,7 +327,7 @@ class MainController extends AppController {
|
|||
$page = intval($this->request->query('page'));
|
||||
|
||||
$conn = ConnectionManager::get('default');
|
||||
$stmt = $conn->execute('SELECT COUNT(id) AS Total FROM block');
|
||||
$stmt = $conn->execute('SELECT height AS Total FROM block oder by id desc limit 1');
|
||||
$count = $stmt->fetch(\PDO::FETCH_OBJ);
|
||||
$numBlocks = $count->Total;
|
||||
|
||||
|
|
Loading…
Reference in a new issue