|
natural24 Newbie
Joined: 09 Nov 2007 Posts: 8
|
Posted: Thu Nov 15, 2007 4:44 am
#new question |
Ok i have 2 fields
Field 1 named Room
Field2 named Area
How would i put something in both fields using a alias for example? I'm not fully understanding the syntax for #new. |
|
|
|
JQuilici Adept
Joined: 21 Sep 2005 Posts: 250 Location: Austin, TX
|
Posted: Fri Nov 16, 2007 11:17 pm |
Assuming roomDB has the right columns defined, something like the following:
Code: |
#class RoomArea
#alias addRoomArea {
#var rec {} {} {RoomArea}
#dboffline
#dbload roomDB
rec.Room = %1
rec.Area = %2
#new All rec
#dbsave
#dbonline
}
#class 0
|
Then 'addRoomArea rn an' will create a new record with 'rn' in the Room field and 'an' in the Area field. |
|
_________________ Come visit Mozart Mud...and tell an imm that Aerith sent you! |
|
|
|
|
|