"<<previous<< 2 3 4 5 >>next>>" scheme

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • hSiplu

    "<<previous<< 2 3 4 5 >>next>>" scheme

    hi all,
    I am creating a web project with php/mysql.
    one of qeury result is too high. it returs several thousand rows.
    But I can't show them in one page.
    So I wanna create more than one pages
    then I shall use "<<previous << 2 3 4 5 >>next>>" scheme.
    but i don't have any idea.
    If user clicks 3rd page. I shall show the 3rd page.
    How should I do this ?
    should I again query the whole or a portion ? what is the function
    related to this.
    Thank in advance

  • Thomas Mlynarczyk

    #2
    Re: &quot;&lt;&lt;p revious&lt;&lt; 2 3 4 5 &gt;&gt;next&gt ;&gt;&quot; scheme

    Also sprach hSiplu:
    I am creating a web project with php/mysql.
    one of qeury result is too high. it returs several thousand rows.
    But I can't show them in one page.
    So I wanna create more than one pages
    then I shall use "<<previous << 2 3 4 5 >>next>>" scheme.
    but i don't have any idea.
    If user clicks 3rd page. I shall show the 3rd page.
    How should I do this ?
    should I again query the whole or a portion ? what is the function
    related to this.
    You could use MySQL's LIMIT clause.


    Comment

    • hSiplu

      #3
      Re: &quot;&lt;&lt;p revious&lt;&lt; 2 3 4 5 &gt;&gt;next&gt ;&gt;&quot; scheme

      if I use
      select * from t1 limit 10;
      it shows first 10 returned rows.
      It wont work.
      it would work if an range could be used

      Comment

      • hSiplu

        #4
        Re: &quot;&lt;&lt;p revious&lt;&lt; 2 3 4 5 &gt;&gt;next&gt ;&gt;&quot; scheme

        oh
        I have found it !
        limit [offset,] row_count
        that solves everything :)

        Comment

        Working...