11-27-2014, 02:56 AM
Try to use the "local" keyword as much as possible - variables in Lua are global by default, and you don't want your variables from one function overwritten with variables from another function.
Also don't forget to use SQL placeholders, as this will decrease the possibility of an SQL injection attack.
If you implemented the home-geting function as
Also don't forget to use SQL placeholders, as this will decrease the possibility of an SQL injection attack.
If you implemented the home-geting function as
local sql = "SELECT * FROM Homes WHERE Name = " .. a_HomeNamewhat would happen if I called my home "a; DROP TABLE Homes"? There would be a quite astonished server admin