diff options
author | Steven Barth <steven@midlink.org> | 2009-02-22 23:19:25 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2009-02-22 23:19:25 +0000 |
commit | d730c1263328c5990ce46cdf6394ce6e36cc3609 (patch) | |
tree | 8dc37350e69dcbd0ca82570cfa62a4c710defc93 /libs/nixio/axTLS/www/lua/test_sql.lua | |
parent | d2b11117f26285186b711271d24733d35e0444a1 (diff) |
Add axTLS sourcecode
Diffstat (limited to 'libs/nixio/axTLS/www/lua/test_sql.lua')
-rw-r--r-- | libs/nixio/axTLS/www/lua/test_sql.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libs/nixio/axTLS/www/lua/test_sql.lua b/libs/nixio/axTLS/www/lua/test_sql.lua new file mode 100644 index 0000000000..085ce978c7 --- /dev/null +++ b/libs/nixio/axTLS/www/lua/test_sql.lua @@ -0,0 +1,13 @@ +local s = require"luasql.postgres" + +local env = assert (luasql.postgres ()) +local conn = assert (env:connect ("luasql-test", "tomas")) +local cur = assert (conn:execute ("select count(*) from fetch_test")) + +cgilua.htmlheader() +cgilua.put ("Total lines at table fetch_test is "..cur:fetch()) +cgilua.put (string.format ("<br>\n%s == %s<br>\n", tostring(s), tostring(luasql))) + +cur:close() +conn:close() +env:close() |