View previous topic :: View next topic |
Author |
Message |
DM_Vecna
Joined: 10 Feb 2010 Posts: 37
|
Posted: Mon Apr 05, 2010 6:38 Post subject: copy and paste row |
|
|
Is there an efficient way to copy multiple adjacent cells from one database row to another?
I would like to copy about 20 adjacent columns where sNPC=X. Then start a new row on that same database and insert all of those values in the same columns.
Is there a smart way of doing this besides field by field?
I can give more of an explination if needed.
thanks for the help |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Mon Apr 05, 2010 8:52 Post subject: |
|
|
20 adjacent columns with the same entity type? Seems like your table structure isn't optimized. _________________ In Soviet Russia, NWN plays you! |
|
Back to top |
|
|
DM_Vecna
Joined: 10 Feb 2010 Posts: 37
|
Posted: Mon Apr 05, 2010 18:34 Post subject: |
|
|
Sorry, Maybe I should have described it a little better.
This is a custom faction table
The columns are names of factions in my pw, they in turn match faction creatures hidden in my module.
I have a row for each faction creature (row 1-27 )as well as a row for each PC that starts playing in my module.
The fields are all reputation values (1-100) that reflect how the factions feel about each other. Thus replacing the Bioware faction system with a persistent one.
On the first time a player logs in to my module I would like the script to
- look at the PCs sub-race (which matches the faction names)
- start a new row for the PC with the first column being the value of a local (unique) int stores on the PC named "ID" (used this method instead of PC name thanks for Fireboar)
- Then fill the rest of the row based on the values found in the row where the PCs subrace matches the correct faction.
Any thoughts? |
|
Back to top |
|
|
|