Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
之后的where子句 join子句:
The WHERE clause goes after the JOIN clause(s):
因此,您已经有了错误的方式。简单查询的操作员顺序应为:
您的查询会变成:
但是使用或语句并不好,因为它会导致完整的表格扫描 如果您想创建一个更具性能的脚本,则可以在下面使用联合语句而不是or the the_friend_id and that_friend_id加入。
So you've got the order of operators the wrong way around. The operator order of a simple query should be:
So your query would turn into:
However using or statements is not great as it causes full scans of tables. If you wanted to create a more performant script you could do the below, where you use the union statement instead of the or to get this_friend_id and that_friend_id join.