Loading ...
Sorry, an error occurred while loading the content.

Re: [bang-phpug] How to get the web page with the Query string...

Expand Messages
  • Chidu
    On 7/2/07, guruj_r wrote: Hi, I am in a requirement that i need to restrict the no. of records shown in a page to some 10 records (Search
    Message 1 of 4 , Jul 2, 2007
    • 0 Attachment
      On 7/2/07, guruj_r <guruj_r@...> wrote:
      Hi,

      I am in a requirement that i need to restrict the no. of records
      shown in a page to some 10 records (Search page) and pagination to
      be done. Need to show the No. of pages at the bottom. Each page
      should lead to that page with specific records eg., first page - 1-
      10 records, second page - 11-20 records,...

      I have found about "how to restrict the records and display it"
      (by using Limit in the sql Query).

      But my only problem is i need to frame the sql query with the
      inputs given by the user in the previous page which is available in
      the query string... Now i need to pass the same query string to each
      page (while navigation) so that i can restrict and show the records
      based on Limit applied to the query...

      Can anyone help if you knew the answer...

      Thanks in advance,

      Regards,
      Guru


      Hey Guru,

      First look for the total no. of records and using LIMIT 0,0 in the sql, then
      based on the user specifications of the number of pages to be displayed,
      keep that value as a session variable (or pass the value thru the url ) and
      then fetch those no. of records using the same limit...

      --
      Chidanand. G. B
      +91-98456-51235


      [Non-text portions of this message have been removed]
    • Amit Rana
      If number of parameters and their values are small i.e. query string is not very huge append it to each pager link i.e. page 1, page 2, next etc If there are
      Message 2 of 4 , Jul 3, 2007
      • 0 Attachment
        If number of parameters and their values are small i.e. query string
        is not very huge append it to each pager link i.e. page 1, page 2,
        next etc
        If there are lots of paraneters, create a form with hidden variables
        and post that form on click of your pager links.

        HTH

        --- In bang-phpug@yahoogroups.com, "guruj_r" <guruj_r@...> wrote:
        >
        > Hi,
        >
        > I am in a requirement that i need to restrict the no. of records
        > shown in a page to some 10 records (Search page) and pagination to
        > be done. Need to show the No. of pages at the bottom. Each page
        > should lead to that page with specific records eg., first page - 1-
        > 10 records, second page - 11-20 records,...
        >
        > I have found about "how to restrict the records and display it"
        > (by using Limit in the sql Query).
        >
        > But my only problem is i need to frame the sql query with the
        > inputs given by the user in the previous page which is available in
        > the query string... Now i need to pass the same query string to each
        > page (while navigation) so that i can restrict and show the records
        > based on Limit applied to the query...
        >
        > Can anyone help if you knew the answer...
        >
        > Thanks in advance,
        >
        > Regards,
        > Guru
        >
      • Koushik G raj
        In pagination link, send same old query string with same name and value. for eg displaypage.php?recordset=20 & oldname=oldvalue. Amit Rana
        Message 3 of 4 , Jul 4, 2007
        • 0 Attachment
          In pagination link, send same old query string with same name and value.

          for eg displaypage.php?recordset=20 & oldname=oldvalue.

          Amit Rana <amitrana77@...> wrote: If number of parameters and their values are small i.e. query string
          is not very huge append it to each pager link i.e. page 1, page 2,
          next etc
          If there are lots of paraneters, create a form with hidden variables
          and post that form on click of your pager links.

          HTH

          --- In bang-phpug@yahoogroups.com, "guruj_r" <guruj_r@...> wrote:
          >
          > Hi,
          >
          > I am in a requirement that i need to restrict the no. of records
          > shown in a page to some 10 records (Search page) and pagination to
          > be done. Need to show the No. of pages at the bottom. Each page
          > should lead to that page with specific records eg., first page - 1-
          > 10 records, second page - 11-20 records,...
          >
          > I have found about "how to restrict the records and display it"
          > (by using Limit in the sql Query).
          >
          > But my only problem is i need to frame the sql query with the
          > inputs given by the user in the previous page which is available in
          > the query string... Now i need to pass the same query string to each
          > page (while navigation) so that i can restrict and show the records
          > based on Limit applied to the query...
          >
          > Can anyone help if you knew the answer...
          >
          > Thanks in advance,
          >
          > Regards,
          > Guru
          >






          ---------------------------------
          Here’s a new way to find what you're looking for - Yahoo! Answers

          [Non-text portions of this message have been removed]
        Your message has been successfully submitted and would be delivered to recipients shortly.