How do I hash the admin password in my Users table?
Using SQL Server 2008 R2
I know there is an encryption command is built into PHP but I’m not sure if this is possible using an SQL query.
Example: Table called users, with entry of admin, password is sha1('password')
Use
HASHBYTESand specifySHA1as the algorithm. Example:Edit: as Siva said in the comments though, you should really be storing your passwords differently and at least salting them.
See here: Preferred Method of Storing Passwords In Database