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


Joined: 12 Jun 2009
Posts: 6

PostPosted: Fri Jun 12, 2009 6:44 pm   

%find problems
 
When testing to discover if an item already exists in the database, I use #if ( %find( @NewEQ.Name) = "").

The problem is that it always returns all records except the last one even the the name does not exist in the database.

Any ideas?
Reply with quote
Jankomatic
Beginner


Joined: 17 Jul 2009
Posts: 12

PostPosted: Fri Jul 17, 2009 8:50 pm   
 
Anyone want to take a try on this one? %find seems to not work at all for me. I can do a %find(whatever the hell I feel like typing here) and it always returns the same values.
Reply with quote
screel88
Newbie


Joined: 12 Jun 2009
Posts: 6

PostPosted: Fri Jul 17, 2009 9:01 pm   
 
Still broken for me as well, no matter which view I give it. %find always returns all the records in that view no matter what string I tell it to search for.
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Fri Jul 17, 2009 10:17 pm   
 
Couple of things to try.

I'll assume the DB windows is already open.

Try
Code:
#show %find(%concat('"', @NewEQ.Name, '"'))


If I recall correctly %find assumes it's argument will always be quoted.
_________________
Asati di tempari!
Reply with quote
screel88
Newbie


Joined: 12 Jun 2009
Posts: 6

PostPosted: Fri Jul 17, 2009 11:01 pm   
 
Thanks for the help. However, that codes give me the same records as without the quotes, which is to say all of them from the current view or all of them from the view I specify as part of %find.

Everything else with my database seems to work fine. Could it possibly be in how I set it up? Would whitespace in the name mess it up? I'm at a loss.
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Sun Jul 19, 2009 3:36 am   
 
What is the value of your @NewEQ.Name variable?
_________________
Asati di tempari!
Reply with quote
screel88
Newbie


Joined: 12 Jun 2009
Posts: 6

PostPosted: Sun Jul 19, 2009 8:24 pm   
 
For instance, I have something in my database with the Name field set to "earrings jeweled" and when I do a %find("earrings",All,Name) it will return all the records in the database instead of just the one with earrings in it.
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Sun Jul 19, 2009 9:38 pm   
 
Does it work if you don't provide the view name? What version of CMUD are you using?
_________________
Asati di tempari!
Reply with quote
Jankomatic
Beginner


Joined: 17 Jul 2009
Posts: 12

PostPosted: Sun Jul 19, 2009 11:12 pm   
 
It does not work if you provide the view name. 3.08 BETA is what we are both using I believe.
Reply with quote
screel88
Newbie


Joined: 12 Jun 2009
Posts: 6

PostPosted: Mon Jul 20, 2009 1:24 am   
 
As stated it works the same with or without the view and columns and I am also using 3.08 Beta...
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