I try to execute a simple sqlite statement with rusqlite but get an error everytime.
let seconds = 1;
conn.execute(
"DELETE FROM session WHERE created < DATETIME('now', '?1 seconds')",
params![seconds],
)?;
returns an Err(InvalidParameterCount(1, 0))
.
If I use a static string instead of a parameter, the query works. E.g.
conn.execute(
"DELETE FROM session WHERE created < DATETIME('now', '1 seconds')",
params![seconds],
)?;
How do I get the parameter in there?