以下查询在转储查询时返回bool(false)
:
SELECT *
FROM `account`
LEFT OUTER JOIN `player` ON `account`.`uid` = `player`.`account_uid`
UNION
RIGHT OUTER JOIN `player` ON `account`.`uid` = `player`.`account_uid`
我知道如果查询返回false,那么SQL就会出错,但是我确信语法是正确的,我甚至在我的控制台和phpMyAdmins SQL工具上成功运行了它。
如果我在没有
的情况下运行它 LEFT OUTER JOIN `player` ON `account`.`uid` = `player`.`account_uid`
UNION
RIGHT OUTER JOIN `player` ON `account`.`uid` = `player`.`account_uid`
一切正常。
我的查询有什么问题?
提前致谢。
答案 0 :(得分:0)
我设法通过添加另一个
来自行修复它SELECT * FROM `account`
查询。完整查询现在看起来像这样:
SELECT *
FROM `account`
LEFT OUTER JOIN `player` ON `account`.`uid` = `player`.`account_uid`
UNION
SELECT *
FROM `account`
RIGHT OUTER JOIN `player` ON `account`.`uid` = `player`.`account_uid`