Questions about mysql
#2

Well all of those querys aren't correct.
Lets begin with the first query to check if someone exists;
use;
Code:
SELECT * FROM players WHERE Name = '%s'
second;
Code:
INSERT INTO players (Name, Password) VALUES ('%s', SHA1('%s'))
The SHA1 means it will hash the password, if you don't do this, you can read out all player password, or when your database gets hacked or whatever, anyone can read all passwords.
Be sure when you get the password, you also use SHA1 again.

For the select query (last one).
You have to be sure that your pSQLID is correct.
Also notice that mysql is case sensitive for table fields or table names.
So be sure all the names are correct.
Reply


Messages In This Thread
Questions about mysql - by jcvag44800 - 08.05.2014, 11:00
Re: Questions about mysql - by Roel - 08.05.2014, 11:41

Forum Jump:


Users browsing this thread: 1 Guest(s)