I am selecting a value from wordpress database but I am having an error, I saw on many websites before and on this forum but nothing helped.
SELECT `meta_value`
FROM `wp_usermeta`
WHERE `meta_key`=`wp_capabilities`
AND `user_id` = 1;
Unknown column ‘wp_capabilities’ in ‘where clause’
2
Answers
instead of
wp_capabilities
(`) you need to use ‘wp_capabilities’ (‘). Please try this:the column you want is configured with the roles and capabilities of wordpress. if you don’t have it, maybe something was configured wrong when you installed wordpress. here you can read more about it.
https://wordpress.org/support/article/roles-and-capabilities/