Jump to content


Photo

Converting column to MD5 Hash


  • Please log in to reply
2 replies to this topic

#1 PHP_Joker

PHP_Joker
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 27 July 2003 - 10:27 PM

Hi all,

I want to convert my existing SQL password column (currently in text) to MD5. Anyone have a trick for this? I tried a code I thought would work, but it doesn\'t give me enough characters in the new MD5 password.

Here is the code I used:

update mytable
set mycolumn = md5(mycolumn);

Thanks for your help!
Just when you think you\'ve made something idiot proof...... [br] [br]They invent a better idiot!

#2 effigy

effigy
  • Staff Alumni
  • Advanced Member
  • 3,600 posts
  • LocationIL

Posted 28 July 2003 - 12:19 AM

that sql will work. you need to alter that table column to hold a larger number of characters.
Regexp | Unicode Article | Letter Database
/\A(e)?((1)?ff(?:(?:ig)?y)?|f(?:ig)?)\z/

#3 PHP_Joker

PHP_Joker
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 28 July 2003 - 03:28 AM

Thank you for pointing out an obvious oversight on my part effigy! I will get the hang of this eventually!

Thanks Again!
Just when you think you\'ve made something idiot proof...... [br] [br]They invent a better idiot!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users