addCommandHandler("info",
function (player, cmd, name)
if name then
dbQuery(function (qh)
local res = dbPoll(qh, 0)
if res[1] ~= nil then
outputChatBox("Password: "..res[1]["password"], player)
return
end
outputChatBox("Not found!", player, 0, 255, 0)
return
end, db, "SELECT * FROM `accounts` WHERE `name` = ? LIMIT 1", value)
end
end
)
Is this query of optimized?
Does not damage the server & bandwidth?
Need dbFree for this query?