1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-13 13:01:55 +03:00

added lua test cases

git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@128 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
This commit is contained in:
cameronrich
2007-09-17 21:48:39 +00:00
parent 69003c01ac
commit ab7cbe8310
28 changed files with 659 additions and 34 deletions

13
www/lua/test_sql.lua Normal file
View File

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