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
Emit
Magician


Joined: 24 Feb 2001
Posts: 342
Location: USA

PostPosted: Sat Nov 10, 2001 5:02 am   

quick database variable question
 
Does anyone know of a way to use a variable for a fieldname in a database variable? i know varname.@fieldnamevar doesnt work, or anything like that, but maybe there's another trick?


Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sat Nov 10, 2001 8:00 am   
 
quote:

Does anyone know of a way to use a variable for a fieldname in a database variable? i know varname.@fieldnamevar doesnt work, or anything like that, but maybe there's another trick?






I haven't bothered exploring this, but would the #ADDKEY command work?

Syntax: #ADDKEY (data-rec) (field) (value)

You could probably do something like this:

#ADDKEY @city @location %1

Maybe you'll have to force-expand the name and field variables, though.

li'l shmoe of Dragon's Gate MUD
Reply with quote
Emit
Magician


Joined: 24 Feb 2001
Posts: 342
Location: USA

PostPosted: Sat Nov 10, 2001 9:08 am   
 
yes it does, thank you
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sat Nov 10, 2001 8:30 pm   
 
quote:

yes it does, thank you



hmm, well don't I feel like a moron

I asked the same question a few months back, I think, and it didn't occur to us.

li'l shmoe of Dragon's Gate MUD
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