MySQL Database

Hello,
I was wondering if someone could tell me what a password row in a mysql database and its specs. I am not sure what type it should be, etc.

Make it simple text, but apply an MD5 function to it so that when you write the password to it, it gets converted to an md5 value. Later, to check passwords, you use for example php’s md5() function to compare the md5 of the user input with the md5 stored in the dbase.

Hmmm, could you explain that again I really didn’t understand everything. Also, what would the values of a password row in a mysql database be?

VoetStalker is right. VARCHAR should work, because you’ll be using (hopefully) a hashing function such as MD5(). Google MD5 Hash and/or encryption, or look in the php docs if you don’t understand.

Ok, but are there any other values it needs to be? Like unique or something?

nope, there isn’t much configuration you can do in mysql.

Example


CREATE TABLE users (
id INT(3),
user VARCHAR(255),
password VARCHAR(255),
PRIMARY KEY (id)
);

Very basic with few fields but … thats about it.

Where can I learn about hash etc or any tutorials on that stuff.

www.php.net :), they cover most of them. However using Google aint such a bad idea either :slight_smile: