![](templates/Classic/images/spacer.gif) |
Emit Magician
Joined: 24 Feb 2001 Posts: 342 Location: USA
|
Posted: 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?
![](http://www.members.aol.com/chapho/Emit.gif) |
|
|
![](templates/Classic/images/spacer.gif) |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: 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 |
|
|
![](templates/Classic/images/spacer.gif) |
Emit Magician
Joined: 24 Feb 2001 Posts: 342 Location: USA
|
Posted: Sat Nov 10, 2001 9:08 am |
yes it does, thank you
|
|
|
![](templates/Classic/images/spacer.gif) |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: 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 |
|
|
![](templates/Classic/images/spacer.gif) |
|
|