luasql零值

时间:2012-06-01 17:43:24

标签: lua luasql

我尝试按照http://www.keplerproject.org/luasql/examples.html

上的示例进行操作
Lua 5.2.0  Copyright (C) 1994-2011 Lua.org, PUC-Rio
> require "luasql.postgres"
> env = assert (luasql.postgres())
stdin:1: attempt to index global 'luasql' (a nil value)
stack traceback:
    stdin:1: in main chunk
    [C]: in ?
> 

我错过了什么?

1 个答案:

答案 0 :(得分:8)

你可以尝试

luasql = require "luasql.postgres"
env = assert (luasql.postgres())