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
Iceclaw
Apprentice


Joined: 11 Sep 2005
Posts: 124

PostPosted: Thu Jan 19, 2006 2:59 pm   

performing a query on a particular DB
 
Is there a way to direct %query() to use a particular DB that is open when multiple ones are loaded?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Thu Jan 19, 2006 11:45 pm   
 
yes, but in the helpfile this feature is worded rather poorly in the syntax outline (there's no problem with the text description, though it could probably stand for a revision to make it more clear).

Basicly, a %query() looks like this:

results = %query(&new = 1)

The above assumes the current database and searches the ALL view. %query() has an optional second argument that lets you specify the particular view of the database to search:

results = %query(&new = 1, "General Discussion")

Additionally, you can specify the exact database to look in as follows:

results = %query(&new = 1, "General Discussion|Zmud")
_________________
EDIT: I didn't like my old signature
Reply with quote
Pseudo
Wanderer


Joined: 25 Oct 2005
Posts: 99

PostPosted: Fri Jan 20, 2006 12:02 am   
 
Well worded question and answer. This is why he makes the big bucks! Cool
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