fix: remove broken duplicate query in aiLogs()

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-07-05 09:05:05 -05:00
co-authored by Claude Sonnet 4.6
parent 5506ebd2af
commit 9852a749e6
-1
View File
@@ -5708,7 +5708,6 @@ HTML;
if ($company > 0) { $where[] = 'company_id = ?'; $params[] = $company; }
$wSql = $where ? 'WHERE ' . implode(' AND ', $where) : '';
$total = (int)db()->prepare("SELECT COUNT(*) FROM ai_logs $wSql")->execute($params) ? db()->prepare("SELECT COUNT(*) FROM ai_logs $wSql")->execute($params) && 0 : 0;
$stmt = db()->prepare("SELECT COUNT(*) FROM ai_logs $wSql");
$stmt->execute($params);
$total = (int)$stmt->fetchColumn();