tmp fix for stupid queries

This commit is contained in:
Niko Storni 2022-06-17 18:58:10 +02:00
parent fdecf39f93
commit e8e9346a70
2 changed files with 5 additions and 5 deletions

View file

@ -32,9 +32,9 @@ class ClaimsController extends AppController {
} }
$conn = ConnectionManager::get('default'); $conn = ConnectionManager::get('default');
$stmt = $conn->execute('SELECT COUNT(Id) AS Total FROM Claims WHERE ThumbnailUrl IS NOT NULL AND LENGTH(TRIM(ThumbnailUrl)) > 0'); // $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); // $count = $stmt->fetch(\PDO::FETCH_OBJ);
$numClaims = $count->Total; $numClaims = 23000000;
if ($beforeId < 0) { if ($beforeId < 0) {
$beforeId = 0; $beforeId = 0;
@ -58,4 +58,4 @@ class ClaimsController extends AppController {
} }
} }
?> ?>

View file

@ -133,7 +133,7 @@ class MainController extends AppController {
$conn = ConnectionManager::get('default'); $conn = ConnectionManager::get('default');
$stmt = $conn->execute('SELECT COUNT(id) AS Total FROM claim'); $stmt = $conn->execute('SELECT COUNT(id) AS Total FROM claim');
$count = $stmt->fetch(\PDO::FETCH_OBJ); $count = $stmt->fetch(\PDO::FETCH_OBJ);
$numClaims = $count->Total; $numClaims = 20000000;
$stmt = $conn->execute('SELECT MAX(id) AS MaxId FROM claim'); $stmt = $conn->execute('SELECT MAX(id) AS MaxId FROM claim');
$res = $stmt->fetch(\PDO::FETCH_OBJ); $res = $stmt->fetch(\PDO::FETCH_OBJ);