我基本上是在尝试为我所有的 Facebook 朋友返回家乡信息。这是我要执行的查询:
SELECT name, uid, hometown_location FROM user WHERE uid in (SELECT uid2 FROM friend WHERE uid1 = me())
但是,由于某种原因,此查询为大多数用户的 hometown_location 返回“null”。是的,我的权限设置正确。
让我们随机选择一个用户,比如 id = 805246。如前所述,上面的查询返回一个空的家乡位置。但是,以下查询正确地返回 hometowm_location:
SELECT name, uid, hometown_location FROM user WHERE uid = 805246
和这个一样:
SELECT name, uid, hometown_location FROM user WHERE uid IN (805246, 211375, 3438)
那么给了什么?