これは非常に基本的なように思えるかもしれませんが、変数を使用すると正しい構文が見つかりません。
これは機能します:
local updateTable = [[UPDATE userDetails SET month_id = 100 WHERE id=1]]
db:exec( updateTable)
以下はしません:
local myVariable = 100
local updateTable = [[UPDATE userDetails SET month_id = myVariable WHERE id=1]]
db:exec( updateTable)