I’m a bit lost. I have this function below in its own LUA model, and the database is open. When I run this now, I get attempt to index global row. This did work at first. Is this a scope issue? Just not sure why I am seeing this.
function returnUnfinishedPuzzleCount()
sqlString=“SELECT COUNT(*) as INCOMPLETE FROM PUZZLEDATA WHERE COMPLETE=‘N’;”
for row in db:nrows(sqlString) do
print (row.INCOMPLETE)
end
return row.INCOMPLETE
end