Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
umdbandit
Wanderer


Joined: 31 Oct 2004
Posts: 94

PostPosted: Thu Apr 05, 2007 4:18 am   

Multi Table DB's
 
I think I know the answer to this question, but is there a way to make the built in database support multiple tables open at the same time?
_________________
Rufus- Winner of Stuff
Reply with quote
umdbandit
Wanderer


Joined: 31 Oct 2004
Posts: 94

PostPosted: Thu Apr 05, 2007 4:31 am   
 
Is there a way i can get database functionality by using variables typed as database objects?

Here is what I am doing... I've got a master list of stock gear and stuff, and I am making a command so that when it checks my equipment, it will create a new record of that gear in my database, and then i'll be able to to modify this record, without modifying the stock record. I'd be up for easier, better ways of doing this.


Also, another quick question for the above... Assuming I just made a new record using #NEW, how would I find out the record number for it?
_________________
Rufus- Winner of Stuff
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Thu Apr 05, 2007 5:05 am   
 
Quote:

I think I know the answer to this question, but is there a way to make the built in database support multiple tables open at the same time?


The DB module does not use a DB format (currently, it's pretty much a glorified random-access text file) and doesn't have most of the features real databases have. Thus, there's no such thing as multi-table databases in ZMud or CMud except for the mapper and maybe internal ones like for the character database. Did you perhaps mean views? All of the views should be available all the time as long as the DB is open.

Once the DB module gets rewritten, it's likely to support such features.

Quote:

Also, another quick question for the above... Assuming I just made a new record using #NEW, how would I find out the record number for it?


I'm not up on the particulars of #NEW behavior, but assuming it always adds the new record to the end of the file instead of the first place there's space you can just use the %numrec() function.
_________________
EDIT: I didn't like my old signature
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net