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


Joined: 19 Mar 2004
Posts: 4
Location: USA

PostPosted: Sat Sep 18, 2004 3:16 am   

%query acting...well...odd
 
I am experiencing a problem in a query I am writing. In short, when I use:

Code:
#dbload db
#SHOW %query(&NameOfField1=SomeConstantString,MyView)


the record number of all pertinant records are returned as expected. However, when I do something like:

Code:
MyVal = SomeConstantString
#SHOW %query(&NameOfField1=@MyVal,MyView)


no records are returned.



As a concrete example:

Code:
#dbload ci
#SHOW %query(&city_name=Margarthia,primary_view)


returns all records where the city_name field is the city of Margarthia. But when I do this:

Code:
city_to_search_for = Margarthia
#SHOW %query(&city_name=@city_to_search_for ,MyView)


I get no records returned.

In my database, the field city_name is configured to be of type Text and primary_view is a view of all columns in the city.db database


Any help on this (probably silly) issue would be greatly appreciated.
_________________
1/0
Reply with quote
oneoverzero
Newbie


Joined: 19 Mar 2004
Posts: 4
Location: USA

PostPosted: Sat Sep 18, 2004 3:30 am   *ahem*
 
This is gonna hurt....

I found my issue and do not need further help.

The code I presented in my initial post executes just fine for me. I had simplified the problem for posting and right afterward, I went back to my debugging efforts. I found out I had a trigger race condition (don't tell me there isn't a place for #WAIT in scripting) in the population of my city_to_search_for variable. Sorry to trouble the experts with my self-inflicted wounds.
_________________
1/0
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