0

I am writing a fql as below.

fql='SELECT caption, owner, pid, src_big, created FROM photo WHERE aid IN ( SELECT aid FROM album WHERE owner IN (11111) ) LIMIT 1,5';

The problem is: how to write one fql to get the owner name also?

Thanks.

hosir
  • 477
  • 1
  • 9
  • 33

1 Answers1

0

You may get owner name by joining the two tables photo and album. I am not sure how your table columns are but i suppose you must have an pid in album table so you can link tables likes this.

SELECT caption, owner, pid, src_big, created FROM photo LEFT JOIN album ON photo.pid=album.pid where aid IN (11111) LIMIT 1,5
Dynamikus
  • 2,861
  • 4
  • 22
  • 20
  • But i understand that fql does not allow table joining. I have also tried it in the fql console and the following result is got. "Parser error: unexpected 'LEFT' at position 56". – hosir Jun 24 '11 at 07:39
  • Upsss sorry for that. :( This link might help you it shows you how to use fql_multiquery() [link](http://thinkdiff.net/facebook/must-use-fql-multiquery-to-retrieve-data/) – Dynamikus Jun 24 '11 at 14:24
  • There was a question asked the other day that involves using FQL multiquery. I think it may help you. http://stackoverflow.com/questions/6459292/how-do-i-use-the-result-from-fb-fql-multiquery – Nick DeFazio Jun 24 '11 at 15:57