Facebook FQL Distance paginate not working -
i wonder why fql query isnt working
select page_id, name,type, distance(latitude, longitude, "37.7873589", "-122.408227") place type="place" , 5000 < distance(latitude, longitude, "37.7873589", "-122.408227") order distance(latitude, longitude, "37.7873589", "-122.408227") asc limit 10
but 1 works
select page_id, name,type, distance(latitude, longitude, "37.7873589", "-122.408227") place type="place" , 5000 > distance(latitude, longitude, "37.7873589", "-122.408227") order distance(latitude, longitude, "37.7873589", "-122.408227") asc limit 10
the difference in second 1 im using greater ">". in first 1 im using less "<"
i want paginate using facebook places distance.
i figured out solution. reason doing because want paginate distance. if distance of last result can paginate next results using not() exclude within 5000metres instead:
select page_id, name,type, distance(latitude, longitude, "37.7873589", "-122.408227") place type="place" , distance(latitude, longitude, "37.7873589", "-122.408227") < 50000 , not (page_id in( select page_id place distance(latitude, longitude, "37.7873589", "-122.408227") < 5000 )) order distance(latitude, longitude, "37.7873589", "-122.408227") asc
Comments
Post a Comment