About Us
Products
Purchase
Downloads
Support
Forums
Contact Us
Site
 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
Duindain
Novice


Joined: 14 Feb 2003
Posts: 31
Location: Perth, Australia

PostPosted: Sat Oct 02, 2004 4:33 am   

db Querys
 
hey ive written a db query that goes in and sees if the lvl of an item is greater than inputed lvl then should display the name of every item that is and then u can choose to display it
the problem im having is query seems broken
i have the field Level in the database which is a number
if i type
%QUERY( &Level<2)
it will display the primary key of every item in the database be it 0 1 2 or higher lvl
i was hoping someone could paste a working copy of thier %query statement to see if i can get it working
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Sat Oct 02, 2004 12:59 pm   
 
%Query is working correctly for me on 7.05

#SHOW %query(&Level<2)
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
Duindain
Novice


Joined: 14 Feb 2003
Posts: 31
Location: Perth, Australia

PostPosted: Sat Oct 02, 2004 3:45 pm   stumped
 
ok im pretty much stumped atm lets go into specifics
i have atm 3 records in database the view with all records is
AllRecords
Key Name Level Damage Affections
1467eq the Manastone 0 0
1469eq the sceptre 165 0 Maxhit by 125 : Dam by 5
1468eq the Therakian 170 630 InvulPower by 2
This is a simplified version of my db
if i type
#SHOW %find("0",AllRecords,Level)
1467eq|1469eq|1468eq
----------------------------------------
#SHOW %find("165",AllRecords,Level)
no results
----------------------------------------
#SHOW %find("0",AllRecords,Damage)
1467eq|1469eq|1468eq
----------------------------------------
#SHOW %find("630",AllRecords,Damage)
no results
----------------------------------------
#SHOW %find("Max",AllRecords,Affections)
1469eq|1468eq
----------------------------------------
#SHOW %find("Dam",AllRecords,Affections)
1469eq
----------------------------------------
ok now for some querys
#SHOW %query(&Level<2)
1467eq|1469eq|1468eq
----------------------------------------
#SHOW %query(&Level<165)
1467eq|1469eq|1468eq
----------------------------------------
#SHOW %query(&Level<170)
1467eq|1469eq|1468eq
----------------------------------------
#SHOW %query(&Level=170)
no results
----------------------------------------
#SHOW %query(&Damage=630)
no results
ok thats prolly enough for now anyway the format
level-general number/defualt 0/min 0 max999999
damage-general number/defualt 0/min 0 max999999
Name and Affections r text
basically it seems the query function wont work right at all
the find is ok but it cant do anything numerical any help
plz :)
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