IPB

Welcome Guest ( Log In | Register )

2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 
Reply to this topicStart new topic
> [RESOLVED] Backwards in DB (scripting)
Sui(C)ide
post Sep 8 2009, 07:54 PM
Post #1


SuI[C]IdE's DotA Leage Plugin Author
***

Group: Members
Posts: 766
Joined: 23-April 09
From: Australia
Member No.: 49,768



Hey yeah, I know there's a MoveNext, but is there something like MoveBack or whatever that I can use to start from the end of a database, then work backwards?

I was thinking of a command i'd like to add to my league plugin that requires getting the last few entries.

Thanks.


--------------------
IPB Image
Interested in joining an Aus/Nz DotA League? Come by Clan AIDL today, on UWEST.
You may visit our website Here.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
The-Black-Ninja
post Sep 8 2009, 08:57 PM
Post #2


Pure Sex
********

Group: Moderators
Posts: 7,756
Joined: 13-August 06
Member No.: 7,372



http://www.w3schools.com/ado/met_rs_movefirst.asp

I think you're wanting MovePrevious.


--------------------
IPB Image

-My Plugins :: Thanks Pyro :)
IPB ImageIPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Sui(C)ide
post Sep 8 2009, 09:20 PM
Post #3


SuI[C]IdE's DotA Leage Plugin Author
***

Group: Members
Posts: 766
Joined: 23-April 09
From: Australia
Member No.: 49,768



Tried this.
CODE
sdlConnect()
    Set sdl = sdlconn.execute("select * from `games`")
    sdl.MoveLast
        Do Until I = 5
            I = I + 1
            strGames = strgames & sdl.fields(0)
            sdl.MovePrevious
        Loop
sdlConn.Close
AddChat VBWhite, "recent: " & strGames


Got this error.

QUOTE
Error Number: -2147217884 Description: Rowset does not support fetching backward.


--------------------
IPB Image
Interested in joining an Aus/Nz DotA League? Come by Clan AIDL today, on UWEST.
You may visit our website Here.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
The-Black-Ninja
post Sep 8 2009, 09:21 PM
Post #4


Pure Sex
********

Group: Moderators
Posts: 7,756
Joined: 13-August 06
Member No.: 7,372



Get rid of MoveLast.


--------------------
IPB Image

-My Plugins :: Thanks Pyro :)
IPB ImageIPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Sui(C)ide
post Sep 8 2009, 09:30 PM
Post #5


SuI[C]IdE's DotA Leage Plugin Author
***

Group: Members
Posts: 766
Joined: 23-April 09
From: Australia
Member No.: 49,768



QUOTE
Error Number: 3219 Description: Operation is not allowed in this context.


--------------------
IPB Image
Interested in joining an Aus/Nz DotA League? Come by Clan AIDL today, on UWEST.
You may visit our website Here.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
nate
post Sep 12 2009, 06:56 AM
Post #6


Full Member
***

Group: Sr. Members
Posts: 741
Joined: 29-January 06
Member No.: 30



What does
CODE
sdl.Supports(adMovePrevious)
return?

This post has been edited by nate: Sep 12 2009, 06:59 AM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
AwaKening
post Sep 12 2009, 04:44 PM
Post #7


Don't u know who I am
***

Group: Sr. Members
Posts: 764
Joined: 19-February 06
From: Utah
Member No.: 275



Why not just user ORDER BY when you select your games. If you have a date on them, or a counter, you can ORDER BY Id DESC, then just move forward.


--------------------
Rival Nations Reborn Map Creator

Clan RnR.com
If you're looking for a "REAL" dota league script, aim or pm me.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Sui(C)ide
post Sep 15 2009, 09:36 PM
Post #8


SuI[C]IdE's DotA Leage Plugin Author
***

Group: Members
Posts: 766
Joined: 23-April 09
From: Australia
Member No.: 49,768



Yeah, I actually decided to do that.

Resolved.


--------------------
IPB Image
Interested in joining an Aus/Nz DotA League? Come by Clan AIDL today, on UWEST.
You may visit our website Here.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
The-Black-Ninja
post Sep 16 2009, 03:11 PM
Post #9


Pure Sex
********

Group: Moderators
Posts: 7,756
Joined: 13-August 06
Member No.: 7,372



I have marked this topic as resolved. If you did not receive a satisfactory response, please reply and provide as much detail as possible.


--------------------
IPB Image

-My Plugins :: Thanks Pyro :)
IPB ImageIPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 16th October 2019 - 06:01 AM
Skin by Andrea
Website Legal Information | Hosted by LunarPages