9 Feb
2009
9 Feb
'09
3:03 p.m.
Hi. Well you need to install luasql, and work only with lua 5.0 or major. You need a ODBC connection to MySQL. And there is an lua script example: ============================================================ #!/usr/local/bin/lua require "luasql.mysql" env = assert (luasql.mysql()) con = assert (env:connect("DB","user","password","localhost)) cur = assert (con:execute"SELECT id, name FROM test") row = cur:fetch ({}, "a") while row do print(string.format("Id: %s, Name: %s", row.id, row.name)) -- reusing the table of results row = cur:fetch (row, "a") end cur:close() con:close() env:close() ========================================================== regards javar