Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

md5() entire column

Status
Not open for further replies.

ktai

IS-IT--Management
Jan 11, 2005
22
US
Hi,
I have a new mysql database with a few hundred records. Right now every password (in the password field) is stored in plaintext. Is there an easy way to convert every record in the 'password' field to MD5? I know I can use the phpmyadmin command line to convert each record one-by-one, but as you can imagine I do not want to do that.
Thanks!
 
UPDATE tablename SET columname = md5(columnname)

should do it.

I'd also recommend not using "password" as a columnname. It is a MySQL reserved word.


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Perfect! Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top