Skip to content

Commit 76b7da3

Browse files
committed
Fix SQL query quotes for database compatibility
- Change inner quotes from double to single quotes in CASE WHEN statement - Improves compatibility with SQLite and PostgreSQL - Fixes issue reported in PR from csoutham
1 parent 8b44e42 commit 76b7da3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Http/Controllers/QueueMonitorController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function index(Request $request)
7272
$jobsByHour = VantageJob::select(
7373
$dateFormat,
7474
DB::raw('count(*) as count'),
75-
DB::raw('sum(case when status = "failed" then 1 else 0 end) as failed_count')
75+
DB::raw("sum(case when status = 'failed' then 1 else 0 end) as failed_count")
7676
)
7777
->where('created_at', '>', $since)
7878
->groupBy('hour')

0 commit comments

Comments
 (0)