Delete orphans from wp_usermeta
-
Hi. I was trying to clean up some orphan data from the wp_usermeta table after deleting accounts from the wp_users table. I tried the following:
DELETE *
FROM wp_usermeta
WHERE user_id NOT IN
(SELECT ID FROM wp_users)But I get the following:
Error
SQL query: Documentation
DELETE * FROM wp_usermeta WHERE user_id NOT IN (
SELECT ID
FROM wp_users
)MySQL said: Documentation
#1064 – You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘*
FROM wp_usermeta
WHERE user_id NOT IN
(SELECT ID FROM wp_users)’ at line 1Anyone able to help?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Delete orphans from wp_usermeta’ is closed to new replies.