使用 phpmyadmin 的 mySQL INNER JOIN 语法
SELECT Question.userid, user.uid
FROM `question`
WHERE NOT `userid`=2
LIMIT 0, 60
INNER JOIN `user`
ON `question`.userid=`user`.uid
ORDER BY `question`.userid
返回错误:
您的 SQL 语法有错误;检查与您的 MySQL 服务器版本相对应的手册,了解在 'INNER JOIN User
ON question
.userid=user
.uid 附近使用的正确语法ORDER BY question
.userid' at line 5
我一生都无法弄清楚我在这里做错了什么。
SELECT Question.userid, user.uid
FROM `question`
WHERE NOT `userid`=2
LIMIT 0, 60
INNER JOIN `user`
ON `question`.userid=`user`.uid
ORDER BY `question`.userid
returns Error:
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 'INNER JOIN User
ON question
.userid=user
.uid ORDER BY question
.userid' at line 5
Can't for the life of me figure out what I'm doing wrong here.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的查询看起来无效。您可能想尝试以下操作:
Your query doesn't look valid. You may want to try the following: