I'm trying to mass change (120) subscriber passwords. The passwords are stored in table wp_users but I need to change the password based on information from another table wp_usermeta where it has information about what types of users there are.
I've been able to create this:
UPDATE `wp_users` SET `user_pass` = MD5('default') WHERE `wp_usermeta` AND meta_value LIKE `%subscriber%`
But I'm lost after WHERE since sql thinks I'm looking for a column called wp_usermeta when its actually a table.
#1054 - Unknown column 'wp_usermeta' in 'where clause'
Any Ideas? Thanks
////Edit:
UPDATE `wp_users`
SET `user_pass` = MD5('default')
WHERE EXISTS ( SELECT `meta_value` FROM `wp_usermeta`
WHERE `meta_value` LIKE '%subscriber%' )
But it changed all rows in the wp_users table. Any help appreciated. Thanks.