[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Binding arguments from SQL statements with LuaSqlite3
- From: Tim Channon <tc@...>
- Date: Sat, 26 Jun 2010 17:24:01 +0100
Luciano de Souza wrote:
> Hi listers,
>
> Using LuaSqlite3, I got the following error in the 'bind' method:
There seem to be two sqlite3 Lua binding and only one worked for me.
Assuming that is not the problem.
Is this any help from working code (as is).
query=query..string.format('WHERE Year = ? AND Month =?\n')
...
local prepared=db:prepare(query)
later on in a loop
prepared:reset() -- from any previous usage
prepared:bind(1,year) prepared:bind(2,month)
and
for data in prepared:rows() do
end
and
end
prepared:finalize()