lua-users home
lua-l archive

Re: Binding arguments from SQL statements with LuaSqlite3

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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()

AltStyle によって変換されたページ (->オリジナル) /