I have this query
$query = "INSERT INTO $new_db.wp_users (user_login, user_pass, user_nicename)
select user_email, md5(user_password), user_name from $source_db.users";
and i have this function
function wp_hash_password($password) {
require_once('class-phpass.php');
// By default, use the portable hash from phpass
$wp_hasher = new PasswordHash(8, TRUE);
return $wp_hasher->HashPassword($password);
}
i need the query to be like this
$query = "INSERT INTO $new_db.wp_users (user_login, user_pass, user_nicename)
select user_email, ". wp_hash_password(user_password) .", user_name from $source_db.users";
but this is failing ...any ideas
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…