File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / axTLS / www / lua / test_sql.lua
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Fri Sep 28 11:55:55 2012 UTC (11 years, 9 months ago) by misho
Branches: v1_4_8, MAIN
CVS tags: datecs, HEAD
axTLS

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()

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>