作者:俊维肇民74 | 来源:互联网 | 2023-05-18 00:45
ImtryingtoretrievesomedatafromaWordpressdatabase:我正在尝试从Wordpress数据库中检索一些数据:SELECTM.met
I'm trying to retrieve some data from a Wordpress database:
我正在尝试从Wordpress数据库中检索一些数据:
SELECT M.meta_value,wp_users.ID
FROM wp_postmeta AS M
WHERE meta_key = "_from_email" AND post_id = 277124
LEFT JOIN wp_users ON M.meta_value = wp_users.user_email
Here, my intention is to get the ID
of the wp_users
user who has an email
identical to one in meta_value
.
在这里,我的目的是获取w__users用户的ID,该用户的电子邮件与meta_value中的电子邮件相同。
But I get the following error:
但是我收到以下错误:
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 'LEFT JOIN wp_users ON M.meta_value = wp_users.user_email
1064 - 您的SQL语法有错误;检查与MySQL服务器版本对应的手册,以便在'LEFT JOIN wp_users'附近使用正确的语法ON M.meta_value = wp_users.user_email
Do you see any syntax error?
你看到任何语法错误吗?
1 个解决方案