[prev in list] [next in list] [prev in thread] [next in thread]
List: lua-l
Subject: Re: Binding arguments from SQL statements with LuaSqlite3
From: Tim Channon <tc () gpsl ! net>
Date: 2010-06-26 16:24:01
Message-ID: 4C2629A1.6090205 () gpsl ! net
[Download RAW message or body]
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()
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic