Essle Posted May 8, 2013 Share Posted May 8, 2013 Доброго времени суток. Имеется код: local query = dbQuery(connect, "SELECT * FROM `users` WHERE `name`=? and `password`=?", username, password) local result = dbPoll(query, -1) if #result ~= 0 then ..... end Как получить данные из запроса? Link to comment
Kernell Posted May 8, 2013 Share Posted May 8, 2013 Доброго времени суток.Имеется код: local query = dbQuery(connect, "SELECT * FROM `users` WHERE `name`=? and `password`=?", username, password) local result = dbPoll(query, -1) if #result ~= 0 then ..... end Как получить данные из запроса? http://en.wikipedia.org/wiki/Hash_table http://en.wikipedia.org/wiki/Structure http://en.wikipedia.org/wiki/Lua_(programming_language)#Tables Link to comment
Other Languages Moderators Disinterpreter Posted May 9, 2013 Other Languages Moderators Share Posted May 9, 2013 local query = dbQuery(connect, "SELECT * FROM `users` WHERE `name`=? and `password`=?", username, password) local result = dbPoll(query, -1) if #result ~= 0 then ..... end local query = dbQuery(connect, "SELECT * FROM `users` WHERE `name`=? and `password`=?", username, password) local result = dbPoll(query, -1) if #result ~= 0 then ..... end for k,row in pairs (result) do outputChatBox (row ["name"]) end может это сработает? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now