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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
dericpr
Newbie


Joined: 13 Sep 2002
Posts: 6
Location: Canada

PostPosted: Thu Oct 24, 2002 3:30 pm   

Database Question
 
Hello,

I've got a database problem and I'm wondering if anyone here has a solution. I'm trying to build a lookup table for spell components such that when I find a component mages want I will automatically stash it. The triggers and everything are in place, and it works, kinda. The problem is the database view get's "stuck" and won't refresh back to the original view of all the listings. So if I pull out a bunch of different components it will work for a bit and then stop working (as it searches the limited view and not the entire list)

My DB is named Comps and has 2 fields longName and keyName. Here is my trigger..

#var spellComp %lower( {%1})
#var shortName ""
#if %ismember( @spellComp, @spellList) {
#find @spellComp Comps longName
#loopview { #var shortName &keyName }
put @shortName med-spell
#dbreset
}

okay I just tested it now and it's now back to not working!!! ARGH!! That and the damn thing just randomly deletes a longName entry from the list for no reason? Anyone have any clues as to WHY this is happening?

ANd on another note, any idea of Zugg plans on adding sql support to his database? Might make things a little easier...

Annnd.. on another note, is there anyway to access a MySql database from inside zmud? If push comes to shove I'd rather use a robust SQL Db for this.

I realize this ISN'T a complex Database, all the entries are made by hand at this point, i'm just hoping someone has a fix. THanks
Reply with quote
dericpr
Newbie


Joined: 13 Sep 2002
Posts: 6
Location: Canada

PostPosted: Thu Oct 24, 2002 4:08 pm   
 
Well I seem to have managed to get it to work. I know that there will only every be one record found on a search, so I decided to use #query instead. Seems to work great.

Don't know why, but it does :).
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Thu Oct 24, 2002 10:31 pm   
 
You can access a MySQL db through its COM interface, you will need to know the specifics of the COM interface those should be in the documentation for MySQL, then you should read the documentation on the zMud website in the Support library about COM, I believe there are 2 documents there, one is a general overview of how to use COM to connect with other applications, and one tells about zMud's own public COM functions. Both contain numerous examples of scripting and COM, but some may require using a current beta version.
Reply with quote
dericpr
Newbie


Joined: 13 Sep 2002
Posts: 6
Location: Canada

PostPosted: Fri Oct 25, 2002 12:46 am   
 
quote:

You can access a MySQL db through its COM interface, you will need to know the specifics of the COM interface those should be in the documentation for MySQL, then you should read the documentation on the zMud website in the Support library about COM, I believe there are 2 documents there, one is a general overview of how to use COM to connect with other applications, and one tells about zMud's own public COM functions. Both contain numerous examples of scripting and COM, but some may require using a current beta version.





No worries.. I'm using the latest beta's. I realize that I'm agreeing to search for bugs when I do this :). I'm not normally driven to posting, but I didn't really know what else to do!
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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