Menu

Pagination question

Help
2004-08-07
2004-08-22
  • Nickolas Nikolic

    Hello there, I would like to ask a question regarding pagination.

    While the first page is easily available without trouble, how would I get the further results? Do I set anything to do this? Such as setting requestArgument() or resultsLow() and resultsHigh() to new values?

    Thank you.

     
    • Mauricio Díaz

      Mauricio Díaz - 2004-08-22

      Hi,

      I don't know if you have figured this out yet, but here's the answer...

      If you are making a lite request, this is the signature of AmazonQuery::liteQuery :

      liteQuery( string $keywords, string $searchType, [string $mode = "books"], [string $locale = "us"], [integer $page = 1], [string $sort = "Bestselling"])

      as you can see, the 5th parameter is used to specify what page you want to retrieve. Other query functions such as heavyQuery() or simply query(), also have such a parameter.

      Function requestArgument() is only use to retrive the arguments you sent on the last query to AWS, most of which are the arguments passed to the "query functions".

      resultsLow() and resultsHigh() return, respectively, the number of the first and last result generated by your query, e.g. if you request page 2 and you get only 8 items back (i.e. the search returns a total of 18 items) calling resultsLow and High will return 11 and 18, respectively.

      Hope this helps,

      MD

       

Log in to post a comment.