javascript - FQL select column name "AS" alias - Stack Overflow

I am using JSDK, but the problem is for sure in FQL request.I am trying select which makes basic operat

I am using JSDK, but the problem is for sure in FQL request.

I am trying select which makes basic operation and i want to name the result. But facebook always name it "anon"

SQL example:

SELECT (register_time - unregister_time) AS time_registered FROM users where id='1';

It is all about keyword AS.

FQL with problem:

SELECT 1 + 2  from user where uid=me();

It works, but result 3 will have name anon. But I want something like this:

SELECT 1 + 2 AS result  from user where uid=me();

Unfortunately it doesn't know "AS".

Of course I can get value from "anon". But it is quite unhandy when there is more these values.

Is there any way how to name it?

I am using JSDK, but the problem is for sure in FQL request.

I am trying select which makes basic operation and i want to name the result. But facebook always name it "anon"

SQL example:

SELECT (register_time - unregister_time) AS time_registered FROM users where id='1';

It is all about keyword AS.

FQL with problem:

SELECT 1 + 2  from user where uid=me();

It works, but result 3 will have name anon. But I want something like this:

SELECT 1 + 2 AS result  from user where uid=me();

Unfortunately it doesn't know "AS".

Of course I can get value from "anon". But it is quite unhandy when there is more these values.

Is there any way how to name it?

Share edited Sep 15, 2016 at 9:07 Somnath Muluk 57.9k38 gold badges224 silver badges230 bronze badges asked Mar 6, 2012 at 8:16 JindraJindra 81014 silver badges41 bronze badges 4
  • So far as I can tell, you can't. In fact, it doesn't seem that you're able to SELECT more than 1 anonymous field at a time either. – abe Commented Mar 13, 2012 at 0:38
  • Actually, when i was trying i was able. – Jindra Commented Mar 14, 2012 at 18:18
  • What was your query and where/how did you run it? The following, when run in the Graph API Explorer tool only returns a single "anon" field with value 1: SELECT 1,2 FROM user WHERE uid = me() – abe Commented Mar 15, 2012 at 17:25
  • I tried it in developer console. But in real aplication it will look like there is just 1 anonymous field, because of the same name. – Jindra Commented Mar 18, 2012 at 8:31
Add a ment  | 

1 Answer 1

Reset to default 7

Currently facebook FQL doesn't supports select column name "AS" alias. We all love to have to this feature. It's really unhandy to access such instances.

So we have to wait for some time.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744860740a4597685.html

相关推荐

  • javascript - FQL select column name "AS" alias - Stack Overflow

    I am using JSDK, but the problem is for sure in FQL request.I am trying select which makes basic operat

    2天前
    40

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信