luci-app-mwan3: add dependecy to size option
[project/luci.git] / libs / luci-lib-nixio / axTLS / www / lua / test_sql.lua
1 local s = require"luasql.postgres"
2
3 local env = assert (luasql.postgres ())
4 local conn = assert (env:connect ("luasql-test", "tomas"))
5 local cur = assert (conn:execute ("select count(*) from fetch_test"))
6
7 cgilua.htmlheader()
8 cgilua.put ("Total lines at table fetch_test is "..cur:fetch())
9 cgilua.put (string.format ("<br>\n%s == %s<br>\n", tostring(s), tostring(luasql)))
10
11 cur:close()
12 conn:close()
13 env:close()