【求助】Lua连续访问数据库会出错
lua吧
全部回复
仅看楼主
level 2
下面是代码
require 'luasql.mysql'
while true do
env = luasql.mysql()
con = assert(env:connect('TEtest','root','te998'))
assert( con:execute'SET NAMES GB2312')
cur = con:execute('select max(SN) from TE where Devnum = 1;')
row = cur:fetch(row,'a')
x = string.format(' %s', row)
print(x)
con:close()
env:close()
end
开3个终端同时运行这个程序 中间会出现链接MYSQL出错, 求指教
2015年08月24日 08点08分 1
level 5
[楼主好人]
2015年08月24日 08点08分 2
[委屈] 求助
2015年08月24日 09点08分
回复
heؼs����
: 没连过数据库 不晓得勒~
2015年08月24日 09点08分
level 12
没用过数据库[哈哈]
2015年08月24日 12点08分 3
level 11
没用过这个数据库支持库,你可以试着发给这个数据库lib作者看看....
2015年08月24日 13点08分 4
1