Is there a way to pick every row of a column: Password
and replace the values of that picked row to its own value but hashed (md5)?
I think it would need PHP for a script involving MSSQL/ODBC.
Printable View
Is there a way to pick every row of a column: Password
and replace the values of that picked row to its own value but hashed (md5)?
I think it would need PHP for a script involving MSSQL/ODBC.
<?PHP
mssql_connect ('','','');
mssql_select_db ('GunzDB');
$accounts = 0;
$query = mssql_query (sprintf ("SELECT * FROM Login"));
while($row = mssql_fetch_array($query))
{
$accounts += 1;
mssql_query (sprintf ("UPDATE Login SET Password = '%s' WHERE Password = '%s'", md5($row['Password']), $row['Password']));
echo $accounts;
}
?>
Thanks a lot!