SitePoint Sponsor |
|
User Tag List
Results 1 to 5 of 5
Thread: Error displaying results?!?
-
Jan 12, 2005, 23:31 #1
- Join Date
- Dec 2004
- Location
- At My Desk!!
- Posts
- 1,642
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Error displaying results?!?
Ive decided that the code i posted to be wrong was right after all (Its amazing what sleep can do
)
There is a problem though, heres the code again:
PHP Code:$StartRow = ($PageNum - 1) * 4;
$EndRow = ($PageNum * 4) - 1;
PHP Code:. ' LIMIT ' . $StartRow .', ' . $EndRow
page 1 it should display 0, 3
Page 2 = 4,7 and so on.....
However instead of starting from row 4 on page 2 its seems to start from 0 and displays 7 results and then in the next window 7 again
Heres the link (goto php, then sessions) Check it out
Anyone got any ideas"Am I the only one doing ASP.NET in Delphi(Pascal)?"
-
Jan 13, 2005, 00:35 #2
- Join Date
- Nov 2004
- Location
- Parry Sound, ON
- Posts
- 725
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Yeah, it's wrong. The second number in the limit clause is a range, not the last row.
-
Jan 13, 2005, 00:43 #3
- Join Date
- Dec 2004
- Location
- At My Desk!!
- Posts
- 1,642
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
ahhh, right so the range on page 2 is 7 so it will display 7. Ok then how would i set a marker at lets says row 5, 10, 15 and so on.. (Can it be done :'(
)
"Am I the only one doing ASP.NET in Delphi(Pascal)?"
-
Jan 13, 2005, 00:46 #4
- Join Date
- Dec 2004
- Location
- At My Desk!!
- Posts
- 1,642
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
YAY!!!!!!!!!!!!!!!!!!!!!!!!!!!! the info you gave me alowed me to change my code a little and now it works (well more or less
)
Its still displaying the last entry on each page as the first entry on the next page but im sure ill get round that.
Thanks ever so much"Am I the only one doing ASP.NET in Delphi(Pascal)?"
-
Jan 13, 2005, 00:52 #5
- Join Date
- Dec 2004
- Location
- At My Desk!!
- Posts
- 1,642
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Sorted :d
"Am I the only one doing ASP.NET in Delphi(Pascal)?"
Bookmarks