------ Generated by EmmyLua(https://github.com/EmmyLua)--- Created by 22040515.--- DateTime: 2023年1月5日 19:36---require('luasql.mysql')env = luasql.mysql()conn = env:connect('test', 'snb', 'Snb@cloud123', '10.243.178.150', 3306)print(conn)conn:execute('set names utf-8')cur = conn:execute('select * from role')row = cur:fetch({}, 'a')file = io.open('role.txt', 'w+')head = 'table:role\nid | name\n---------\n'print(head)file:write(head)while row dovar = string.format('%d | %s\n', row.id, row.name)print(var)file:write(var)row = cur:fetch(row, 'a')endfile:close()conn:close()env:close()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。