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
1 Answer
Reset to default 7Currently 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
评论列表(0条)