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
moksha
Novice


Joined: 13 Oct 2002
Posts: 37
Location: United Kingdom

PostPosted: Tue Apr 15, 2003 12:07 am   

Database help %find
 
Hi again

I have a couple of questions.

Firstly, how would I go about getting a specific record returned from a %find?

#al {find} {#FORALL %find( "%-1") {#SHOWDB %i}}

For example if I 'find dragon' it shows Dragon, Dragonman, Dragonlord etc. I just want it to match exactly what's in the alias.

Secondly, how would I send this information to a child window instead of the main one?

Thanks in advance.

Moksha
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue Apr 15, 2003 6:00 am   
 
If you want an exact match, use the %query function.

Two methods come to mind for sending the information to a child window.
1. Use triggers and #CAP/#GAG
2. Send the query from the child window

LightBulb
Advanced Member
Reply with quote
moksha
Novice


Joined: 13 Oct 2002
Posts: 37
Location: United Kingdom

PostPosted: Tue Apr 15, 2003 12:02 pm   
 
Lightbulb,

I have read the help files on %query a few times now and its just not going in. Could you, or anyone else, explain the syntax and how it works?

Thanks for the #cap/#gag idea, This seems the easiest.

Moksha
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue Apr 15, 2003 4:05 pm   
 
Assuming the first column is named Name: Instead of %find(dragon) use %query(&Name = "Dragon", All)

LightBulb
Advanced Member
Reply with quote
moksha
Novice


Joined: 13 Oct 2002
Posts: 37
Location: United Kingdom

PostPosted: Tue Apr 15, 2003 4:16 pm   
 
Thanks Lightbulb, works perfectly.

Moksha
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