从粉丝页面获取事件的 FQL 查询错误

发布于 2024-12-03 17:07:34 字数 1301 浏览 0 评论 0原文

我正在尝试获取粉丝页面创建的所有活动。我使用了下面的查询。

SELECT eid, name, description, pic_big, start_time, end_time, location 
FROM event 
WHERE creator = 142258389139112 
      AND eid IN (SELECT eid FROM event_member WHERE uid = 142258389139112)

好的,这工作正常,但我在 FQL 文档中看到,如果我不指定 <表 event_member 中的 code>start_time 它只会返回未来的事件,但我需要粉丝页面创建的所有事件,这包括事件过去的时间。

我尝试使用此查询:

SELECT eid, name, description, pic_big, start_time, end_time, location 
FROM event 
WHERE creator = 142258389139112 
      AND eid IN (
          SELECT eid 
          FROM event_member 
          WHERE uid = 142258389139112 
                AND start_time > 1316649600 
          ORDER BY start_time
      )

但它返回此错误:

“错误代码”:604, "error_msg": "无法同时通过 'eid' 和 'start_time' 查询",

当我尝试使用我的 uid 时,通常会查询该函数:

SELECT eid, name, description, pic_big, start_time, end_time, location 
FROM event 
WHERE creator = 142258389139112 
      AND eid IN (
          SELECT eid 
          FROM event_member 
          WHERE uid = me() 
                AND start_time > 1316649600 
          ORDER BY start_time
      )

I'm trying to get all events created by a fan page. I used the query below.

SELECT eid, name, description, pic_big, start_time, end_time, location 
FROM event 
WHERE creator = 142258389139112 
      AND eid IN (SELECT eid FROM event_member WHERE uid = 142258389139112)

OK, this works fine, but I see in the FQL documentation that if I do not specify the start_time in table event_member it will just return the future events, but I need ALL events created by the fan page, and this includes when the event is in the past.

I try to use this query:

SELECT eid, name, description, pic_big, start_time, end_time, location 
FROM event 
WHERE creator = 142258389139112 
      AND eid IN (
          SELECT eid 
          FROM event_member 
          WHERE uid = 142258389139112 
                AND start_time > 1316649600 
          ORDER BY start_time
      )

But it returns this error:

"error_code": 604,
"error_msg": "Cannot query by both 'eid' and 'start_time'",

When I try to use my uid, this query the function normally:

SELECT eid, name, description, pic_big, start_time, end_time, location 
FROM event 
WHERE creator = 142258389139112 
      AND eid IN (
          SELECT eid 
          FROM event_member 
          WHERE uid = me() 
                AND start_time > 1316649600 
          ORDER BY start_time
      )

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

燃情 2024-12-10 17:07:34

您有一个小语法错误,请参阅下面的工作查询。

SELECT eid, name, description, pic_big, start_time, end_time, location 
FROM event
WHERE creator = 142258389139112 
AND eid IN (SELECT eid FROM event_member WHERE uid = 142258389139112)
AND start_time > 1316649600
ORDER BY start_time

我希望这有帮助。

You have a small syntax error, see the working query below.

SELECT eid, name, description, pic_big, start_time, end_time, location 
FROM event
WHERE creator = 142258389139112 
AND eid IN (SELECT eid FROM event_member WHERE uid = 142258389139112)
AND start_time > 1316649600
ORDER BY start_time

I hope this helps.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文