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
kilpher
Newbie


Joined: 26 Dec 2005
Posts: 5

PostPosted: Tue Dec 12, 2006 3:48 am   

%find - exact
 
Is there a way to use %find to find only exact matched in a db?

I want to modify:
%find (@SpellToFind, SpellupSpells)

where @SpellToFind = shield

to pull only the second record from the following list:
party shield
shield
spirit shield

Thanks,
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Tue Dec 12, 2006 11:22 am   
 
Use %query instead. I have personally always found its handling to be better.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
kilpher
Newbie


Joined: 26 Dec 2005
Posts: 5

PostPosted: Tue Dec 12, 2006 2:31 pm   
 
a straight up %query returned the exact same results as %find, but I was able to use it to create a condition that also checked the length of my search string

#SHOW {%query( (&SpellName = @SpellToFind) & (%len(&SpellName ) = %len(@SpellToFind)), All)} returns one record for shield.
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