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
Menliros
Beginner


Joined: 30 May 2010
Posts: 18

PostPosted: Fri Feb 03, 2012 12:25 pm   

%find not working as expected with views
 
I'm trying to extract entries from my database using:

DBSearchResults=%find(%i,Zone)

%i contains an existing entry in the Zone view, but I'm getting back zip. If i lose the Zone argument I will get back entries containing the keywords in %i. So the problem lies with the view argument. I'm probably doing something silly wrong, but can't figure out what. Who can help?
Reply with quote
Menliros
Beginner


Joined: 30 May 2010
Posts: 18

PostPosted: Sat Mar 10, 2012 1:29 am   
 
So far i've disabled Views since nobody has an answer for me. I run into another problem then. If i use:

DBSearchResults=%find(%i)

and %i is an exact match to an entry in the database i don't get the entry back, but the first record in the database.

Any help on this?
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Sat Mar 10, 2012 10:53 pm   
 
I don't have an answer for you; I stopped using the internal database long ago. I suspect that's true of a lot of us. The only thing I have to offer is that you could use an external database such as SQLite. The newer functions %sql() and %sqldb() let you interact with an external database using standard SQL commands. The original plan was that the internal database would be upgraded in Cmud, but the new interaction with external databases makes that somewhat superfluous. The internal database is becoming a legacy of Zmud that few of us remember.
Reply with quote
Menliros
Beginner


Joined: 30 May 2010
Posts: 18

PostPosted: Tue Mar 13, 2012 2:29 pm   
 
Aaaah ok. Any tips on converting the content of the CMUD database to SQlite?
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Wed Mar 14, 2012 1:23 am   
 
I would say, start from scratch. You can do so much more with a relational database, even a simplified one like SQLite, that you can't with the internal database that merely translating will severely limit your options. If you are actually going to use SQLite or some other SQL database, and you already know something about relational databases, I suggest that you completely rethink what you want to do with your database. Take advantage of the relationships you can build in the db.

On the other hand, you don't know anything at all about relational databases, we can probably make some suggestions on making a simple set of tables that work somewhat like your existing tables if you give us some details on what you have set up currently.
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