Jump to content

set up password field for MD5


dazz_club

Recommended Posts

Hi guys and girls,I am setting up a database and would like to have my passwords encrpted by using MD5, howver i am having trouble writing the sql syntax for this, here is what i have got so far;CREATE TABLE `SourceUK` ( `ID` INT NOT NULL AUTO_INCREMENT, `password` VARCHAR(50) NULL, <-------- where do i put MD5 in this syntax?? `username` VARCHAR(50) NULL, kind regardsDazzclub

Link to comment
Share on other sites

You don't specify the encryption when setting up tables, you do that when you INSERT. Just make the field VARCHAR(32) (as MD5 hashes are 32 hexadigits long).

Link to comment
Share on other sites

You don't specify the encryption when setting up tables, you do that when you INSERT. Just make the field VARCHAR(32) (as MD5 hashes are 32 hexadigits long).
aww man then i am buggered, I have .sql file which contains a ###### of alot of members. originally had at least few members, so i just created a form that encrypted the passwords when i submitted them to the database. I tought there may have been a quicker way using sql syntax.aw man, i feel sad now. :)
Link to comment
Share on other sites

You could just do on your members table to hash current member's passwords

UPDATE SourceUK SET password = MD5(password)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...