LUA Sqlite3 - Execute sql command with an arguments

I was learning lua integration with sqlite data base. I am facing an issue in execute command,
local env = luasql.sqlite3() -- Create a database environment object
local conn = env:connect("file name") -- Open a database file
local output = conn:execute()

conn:execute("command") --> its working fine
conn:execute("command %q" % userinput) --> not getting output.
Can someone guide me in this, am i using the execute command properly. All i tried was to use conn:execute() with an user input.

I got the solution, used string.format for that. :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.