mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-21 10:26:06 +03:00
git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@128 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
14 lines
411 B
Lua
14 lines
411 B
Lua
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()
|