|
Nass Beginner
Joined: 16 Jan 2002 Posts: 12
|
Posted: Sun Mar 02, 2003 2:38 pm
database scripting question |
I have an items database made through plagiarising several other scripts I found on the web. However, it's not that good, and whereas I want it to /stat each item from vnum 1 to 1600, it will occasionally miss out some. At the moment I go into it and manually check to see which are missing, which is pretty inefficient.
Would anyone be able to point me to a few help pages or examples of scripts that actually do something like or from which I can work out how to look at collumns in the database and for a certain field, if a number is missing, add that # to some todo list or something like it?
Many thanks =) |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Sun Mar 02, 2003 4:29 pm |
If your database tracks the vnums then you could use the command
#LOOPDB database-rec {commands}
You'd remember what the last vnum was, read in the current vnum and
add all the mising vnums to a string list. Once the database has
been looped through, you would figuratively:
#FORALL @MissingVnumStringList {commands /stat? to view/capture that object}
Ton Diening |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sun Mar 02, 2003 9:40 pm |
#LOOP 1,1600 {#IF %query( &vnum = %i, All) {} {#ADDI ToDoList {%i}}}
LightBulb
Advanced Member |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|