Help with Pagination I used this code to get a pager.

   if (isset($_GET['tid'])) {
     $id=($_GET['tid']);
     $query = new EntityFieldQuery();
     $query-&gt;entityCondition('entity_type', 'node');
     $query-&gt;entityCondition('bundle', 'escorts_product');
     $query-&gt;pager(2,1);
     $query-&gt;propertyCondition('status', 1);
     $query-&gt;fieldCondition('field_product_sub_cat', 'tid', $id,'=');
     $result = $query-&gt;execute();
    //print "&lt;pre&gt;";print_r($result);
    }


When I used print "&lt;pre&gt;";print_r($result), it gave me 2 results on y page, whereas I added more than 2; this is right. 

How should I get links for next page and also previous, next? Is there any other way to get a pager?
To get the links for the next/previous pages you need to use theme('pager').

On this post you can find an example of that implementation.