From 706624b47b928c6b28d023250b983326a2b55eb4 Mon Sep 17 00:00:00 2001 From: andrewlalis Date: Sun, 23 Jul 2023 20:02:53 -0400 Subject: [PATCH] Fix bind index --- source/app.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/app.d b/source/app.d index 7e82536..5482545 100644 --- a/source/app.d +++ b/source/app.d @@ -172,7 +172,7 @@ LogEntry[] getRecentLogEntriesByRemoteAddress(string remoteAddress) { import std.array : Appender, appender; Database db = Database("logbook.sqlite"); Statement stmt = db.prepare("SELECT * FROM log_entry WHERE remote_address = :addr ORDER BY created_at DESC LIMIT 10"); - stmt.bind(0, remoteAddress); + stmt.bind(1, remoteAddress); ResultRange results = stmt.execute(); Appender!(LogEntry[]) app = appender!(LogEntry[])(); foreach (Row row; results) {