From e8e9346a7061955c04f845378965d3be616f9050 Mon Sep 17 00:00:00 2001 From: Niko Storni Date: Fri, 17 Jun 2022 18:58:10 +0200 Subject: [PATCH] tmp fix for stupid queries --- src/Controller/ClaimsController.php | 8 ++++---- src/Controller/MainController.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Controller/ClaimsController.php b/src/Controller/ClaimsController.php index aa3efc7..6a2dada 100644 --- a/src/Controller/ClaimsController.php +++ b/src/Controller/ClaimsController.php @@ -32,9 +32,9 @@ class ClaimsController extends AppController { } $conn = ConnectionManager::get('default'); - $stmt = $conn->execute('SELECT COUNT(Id) AS Total FROM Claims WHERE ThumbnailUrl IS NOT NULL AND LENGTH(TRIM(ThumbnailUrl)) > 0'); - $count = $stmt->fetch(\PDO::FETCH_OBJ); - $numClaims = $count->Total; +// $stmt = $conn->execute('SELECT COUNT(Id) AS Total FROM Claims WHERE ThumbnailUrl IS NOT NULL AND LENGTH(TRIM(ThumbnailUrl)) > 0'); +// $count = $stmt->fetch(\PDO::FETCH_OBJ); + $numClaims = 23000000; if ($beforeId < 0) { $beforeId = 0; @@ -58,4 +58,4 @@ class ClaimsController extends AppController { } } -?> \ No newline at end of file +?> diff --git a/src/Controller/MainController.php b/src/Controller/MainController.php index b5376e7..ba9cb0d 100644 --- a/src/Controller/MainController.php +++ b/src/Controller/MainController.php @@ -133,7 +133,7 @@ class MainController extends AppController { $conn = ConnectionManager::get('default'); $stmt = $conn->execute('SELECT COUNT(id) AS Total FROM claim'); $count = $stmt->fetch(\PDO::FETCH_OBJ); - $numClaims = $count->Total; + $numClaims = 20000000; $stmt = $conn->execute('SELECT MAX(id) AS MaxId FROM claim'); $res = $stmt->fetch(\PDO::FETCH_OBJ);