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


Joined: 17 Apr 2005
Posts: 496

PostPosted: Fri Dec 16, 2005 4:37 am   

Case problems with databases/dbput.
 
I have a database which contains (among other things) an option list (Clans) and a single option (Bloodline), both of which have the "allow other" box checked. I'm populating the database from a capture script which stores everything into database variable and then uses #dbput to update the database.

The script does a #show on the database variable right before it puts it into the database and it looks fine at that point. A simple database variable looks like thus:
Code:
Name = Kya
Gender = Female
Race = Ssylsin
Birthday = 462-03-02
RankedImperian = 0
Cityrank = 1
City = Khandava
ExplorerRank = 1
Clans = The Shared Grove


And here's a more complicated example:
Code:
Name = Elyse
Gender = Female
Race = Norrjin
Birthday = 383-09-20
Bloodline = Bharathian
RankedImperian = 78
RankedQuesting = 171
RankedBashing = 89
RankedPlayerkilling = 329
CombatRating = 100
ExplorerRank = 15
Fishing = 9
Clans = Bharathian|Followers of peace|The Pantheon of Antioch
Mentor = 1
QHonors = 1


The problem is that when I look at it in the database the "bloodline" and "clans" fields are all completely lowercased, e.g. "the shared grove", or "bharathian". The only thing I can do to fix it is to go in and manually edit the options list to have the correct words uppercased, which would be far too long of a task for this DB.

Anyone have any suggestions, or need more examples?
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Fri Dec 16, 2005 9:00 am   
 
Option lists only support 31 values. I would suggest adding a new field (memo or text type) to your database to transfer the Clans field information into then use a script to make the update to all the records. After that you can delete your Clans field and rename the new field to Clans. You may have to do the same with the Bloodlines field, since this also might exceed the 31 limit.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
gamma_ray
Magician


Joined: 17 Apr 2005
Posts: 496

PostPosted: Fri Dec 16, 2005 4:47 pm   
 
Hmm, thanks, I didn't know that and I've switched over as I definitely would have run out. I'm still interested in hearing if anyone has a solution to the case problem, though, just for future reference.
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