Gossamer Forum
Home : Products : DBMan : Customization :

New Installation, problem with customizing

Quote Reply
New Installation, problem with customizing
I am setting up DBman to be the database for fake (SIM) horses for members of an on-line game. I have installed DBman and the demo database was working just fine. When I went in to customize my fields, that is when I get an error. Here is how I set up my customized fields:

Quote:
%db_def = (
ID => [0, 'numer', 5, 8, 1, '', ''],
Horse's Name => [1, 'alpha', 40, 255, 1, '', ''],
Breed => [2, 'alpha', 40, 255, 1, '', ''],
Date of birth => [3, 'alpha', 40, 255, 1, '', ''],
Color => [4, 'alpha', 40, 255, 1, '', ''],
Height => [5, 'alpha', 5, 255, 1, 'hh', ''],
Sire x Dam => [6, 'alpha', 40, 255, 1, '', ''],
Notes => [7, 'alpha', '40x3', 500, 0, '', ''],
Breeder => [8, 'alpha', 40, 255, 1, '', ''],
Stabled At => [9, 'alpha', 40, 255, 1, '', ''],
Owner => [10, 'alpha', 40, 255, 1, '', '']
);
It looks neater in my default.cfg file, heh.
This is the only field I have changed (except for the URL link pointing to where DBman is installed).

Any help is appreciated.
Quote Reply
Re: [threeringfilly] New Installation, problem with customizing In reply to
If you are going to have field names that contain spaces it's best to put them in single quotes such as:


'ID' => [0, 'numer', 5, 8, 1, '', ''],
'Horse's Name' => [1, 'alpha', 40, 255, 1, '', ''],
'Breed' => [2, 'alpha', 40, 255, 1, '', ''],
'Date of birth' => [3, 'alpha', 40, 255, 1, '', ''],
'Color' => [4, 'alpha', 40, 255, 1, '', ''],
'Height' => [5, 'alpha', 5, 255, 1, 'hh', ''],
'Sire x Dam' => [6, 'alpha', 40, 255, 1, '', ''],
'Notes' => [7, 'alpha', '40x3', 500, 0, '', ''],
'Breeder' => [8, 'alpha', 40, 255, 1, '', ''],
'Stabled At' => [9, 'alpha', 40, 255, 1, '', ''],
'Owner' => [10, 'alpha', 40, 255, 1, '', '']

You may want to change: 'Horse's Name'

to: 'Horse Name'

just to be sure that the 's won't cause problems. Are you using autogenerate for your forms? If not you will need to change the fields in your sub html_record_form to match your new fields.

Hope that helps

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] New Installation, problem with customizing In reply to
Ok, I did as you instructed, and now it's working... but the form that shows up is the old demo form and not the one I customized.

Also, I tried making 2 of the fields drop-down fields.

I've uploaded my code (in a txt file) to http://www.maelia.org/hf/default-edit.txt
Quote Reply
Re: [threeringfilly] New Installation, problem with customizing In reply to
Nevermind, I figured it out. Thank you for your help!