Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - how can i skip to the next user?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

how can i skip to the next user?

 Post Reply Post Reply Page  <123>
Author
pmormr View Drop Down
Senior Member
Senior Member


Joined: 06 January 2003
Location: United States
Status: Offline
Points: 1479
Post Options Post Options   Thanks (0) Thanks(0)   Quote pmormr Quote  Post ReplyReply Direct Link To This Post Posted: 14 April 2003 at 9:06am
but still it does know what record you are on because of the other fields. When your use your order by clause it takes the records and places them in order according to the field lastname. It doesn't worry about any of the other fields.
Back to Top
Scotty32 View Drop Down
Moderator Group
Moderator Group


Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scotty32 Quote  Post ReplyReply Direct Link To This Post Posted: 14 April 2003 at 9:10am

yeah i understand wot ya sayin, but wot i mean is, if i put this code on my page... how can i have a "next" and "back" buttons,

cose i'll open the database and show the info for lets say ID 5 but i want to skip to the person next in the line from the Lastname which lets say is id 20, but how will it know to go from 5 to 20?

it sounds like in the thing ya sayin it'll just keep goin thru them from the first person

could i make a new page like "next.asp" but then it wouldnt know i was on fire

Back to Top
pmormr View Drop Down
Senior Member
Senior Member


Joined: 06 January 2003
Location: United States
Status: Offline
Points: 1479
Post Options Post Options   Thanks (0) Thanks(0)   Quote pmormr Quote  Post ReplyReply Direct Link To This Post Posted: 14 April 2003 at 9:14am

because when you selected with the sql statement it threw them into order by their lastname. back to my example:

ID                LASTNAME
1                 X
2                 M
3                 A

the order by clause puts the lastnames in alphabetical order

ID              LASTNAME
3               A
2               M
1               X

when you say rs.movefirst then it goes to record number 3. when you say rs.movenext it goes to 2 and so on

Back to Top
Scotty32 View Drop Down
Moderator Group
Moderator Group


Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scotty32 Quote  Post ReplyReply Direct Link To This Post Posted: 14 April 2003 at 9:27am

yeah i kinda understand it

but is there anyway i can go to lets say "page.asp?id=2"

and skip from ID 2 to 1? (from your lil table)

Back to Top
pmormr View Drop Down
Senior Member
Senior Member


Joined: 06 January 2003
Location: United States
Status: Offline
Points: 1479
Post Options Post Options   Thanks (0) Thanks(0)   Quote pmormr Quote  Post ReplyReply Direct Link To This Post Posted: 14 April 2003 at 9:30am

no, you ordered them by lastname

Back to Top
Scotty32 View Drop Down
Moderator Group
Moderator Group


Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scotty32 Quote  Post ReplyReply Direct Link To This Post Posted: 14 April 2003 at 9:34am

do you know wot am tryin to do?

its hard to explain i guess

Back to Top
pmormr View Drop Down
Senior Member
Senior Member


Joined: 06 January 2003
Location: United States
Status: Offline
Points: 1479
Post Options Post Options   Thanks (0) Thanks(0)   Quote pmormr Quote  Post ReplyReply Direct Link To This Post Posted: 14 April 2003 at 9:36am
no
Back to Top
Scotty32 View Drop Down
Moderator Group
Moderator Group


Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scotty32 Quote  Post ReplyReply Direct Link To This Post Posted: 15 April 2003 at 2:52am

ok so if my table is like this

id            name
-------------------
1                s
2                f
3                b
4                e
5                h
6                a
7                z

can it only go from "id 6" to "id 3" or can i, if am on "id 4" go to "id 2"

becose "id 2" is after "id 4" in the "name" field

wot i want to do is if i go to sumone, id like to be able to get to the next person from the "name" field but so the persons details from there "id"

Back to Top
 Post Reply Post Reply Page  <123>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.