-- 演示将多条记录数据组合成一条sql插入语句(for mysql)
function getTpl0(tname)-- 获取表各个字段
local t = {
tpl_pack = {"packId","itemId","`group`","num","rate","rateType"},
}
for k, v in pairs(t) do
if tname == k then
return t[k]
end
end
end
--tpl = {3813,10,0,2,0,1,1,0,350,5,220,6,0,0,0,0,154,0,0,0,210,80,29}
tpl9122 = {
-- "packId","itemId","`group`","num","rate","rateType"
{9122, 3294, '', 1, 1, 2},
{9122, 3295, '', 1, 1, 2},
{9122, 3296, '', 1, 1, 2},
{9122, 3297, '', 1, 1, 2},
{9122, 3298, '', 1, 1, 2},
{9122, 9004, '', 2, 4, 2},
{9122, 117, '', 8, 4, 2},
{9122, 118, '', 8,