Thread: SQL Problem
View Single Post
  #2  
Old 10-13-2011, 08:22 AM
Mark Sir Link Mark Sir Link is offline
Kevin Azite
Mark Sir Link's Avatar
Join Date: Sep 2005
Posts: 1,489
Mark Sir Link is just really niceMark Sir Link is just really nice
Send a message via AIM to Mark Sir Link
because you're constantly cycling through all rows.

your query should be something like SELECT * FROM Accounts WHERE Account='"@params[1]@"'";

then if your returned rows array size is greater than one, you know the account exists.

then, if the password is correct, then it is valid.

However, this sort of password authentication on a server is usually pretty pointless since you should inherently trust the login of the player itself from Graal.

If it's to try to add an extra layer of security to staff tools, you can simply verify some additional right like player.hasrightflag("warptoxy") and that will verify that the staff member is logging in from a valid location as determined by their listed IP/PC ranges
Reply With Quote