Quote:
Originally posted by Xenon
write a small script to encrypt ther pws automatically:
PHP Code:
<?php
require('./global.php');
for($i=2;$i<=9000;$i++) {
$info=$DB_site->query_first("SELECT userid,password FROM user WHERE userid='".$i."');
if($info[userid]==$i) $DB_site->query("UPDATE user SET password='".md5($info[password])."' WHERE userid='".$i."');
}
?>
replace the 9000 with the highest userid you have
|
Ouch man, that'll cause 18,000 queries a large headache to your host!
PHP Code:
<?php
require('./global.php');
$DB_site->query('UPDATE user SET password=MD5(password)');
echo 'Yes, we did it!';
?>
Unless you have a terribly old version of MySQL which doesn't support the MD5() function.