Fix bind index
This commit is contained in:
parent
0e3881dcac
commit
706624b47b
|
@ -172,7 +172,7 @@ LogEntry[] getRecentLogEntriesByRemoteAddress(string remoteAddress) {
|
||||||
import std.array : Appender, appender;
|
import std.array : Appender, appender;
|
||||||
Database db = Database("logbook.sqlite");
|
Database db = Database("logbook.sqlite");
|
||||||
Statement stmt = db.prepare("SELECT * FROM log_entry WHERE remote_address = :addr ORDER BY created_at DESC LIMIT 10");
|
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();
|
ResultRange results = stmt.execute();
|
||||||
Appender!(LogEntry[]) app = appender!(LogEntry[])();
|
Appender!(LogEntry[]) app = appender!(LogEntry[])();
|
||||||
foreach (Row row; results) {
|
foreach (Row row; results) {
|
||||||
|
|
Loading…
Reference in New Issue