Gossamer Forum
Home : Products : DBMan : Installation :

Problems modifying records..

Quote Reply
Problems modifying records..
I have the search working fine, but when I want to modify a record, it omits most of the fields. My config and more explanation is below.

%db_def = (
ID => [0, 'numer', 5, 5, 0, '', ''],
CardName => [1, 'alpha', 30, 255, 0, '', ''],
Set => [2, 'alpha', 30, 255, 0, '', ''],
Color => [3, 'alpha', 30, 255, 0, '', ''],
CardType => [4, 'alpha', 30, 255, 0, '', ''],
Cost => [5, 'alpha', 7, 7, 0, '', ''],
PowTgh => [6, 'alpha', 12, 15, 0, '', ''],
CardText => [7, 'alpha', 40x4, 255, 0, '', ''],
Artist => [8, 'alpha', '40', 500, 0, '', ''],
Rarity => [9, 'alpha', 13, 13, 0, '', ''],
Price => [10, 'numer', 10, 10, 0, '', ''],
);

# The column name for the database key. Can be any column, but it must be unique!
# You can't have two records with the same key value!
$db_key = 'ID';
# Track the key? Should DBMan keep a counter of the next key to use? This isn't
# neccessary if you can guarantee that your entry in the key field will be unique
# (i.e. a userid).
$db_key_track = 1;
# Database delimeter.
$db_delim = '|';
# Use file locking (1 = Yes, 0 = No). Should be used, but won't work on Win95.
$db_use_flock = 1;
# Auto generate the html forms (1 = Yes, 0 = No).
$db_auto_generate = 0;
# Display Benchmarking Information (1 = Yes, 0 = No).
# use Benchmark; # Uncomment this line if benchmarking is used.
$db_benchmark = 0;
# Display Debugging Information (1 = Yes, 0 = No).
$db_debug = 0;
# Select fields. Field name => 'comma seperated list of drop down options'.
%db_select_fields = (
Category => 'General,Configuration Management,Project Management,Process Improvement,Standards,Testing & Qua
lity Assurance',
Rarity => 'C, U, R',
);

# Radio fields. Field name => comma seperated list of radio buttons.
%db_radio_fields = ( Validated => 'Yes,No' );

# Checkbox fields. Field name => Checkbox value.
%db_checkbox_fields = ( Popular => 'Yes' );

# Default maximum number of hits returned in a search.
$db_max_hits = 10;
# Bold search results (1 = Yes, 0 = No).
$db_bold = 1;
# Regular and title fonts used in auto_generatrion and html.pl.
$font = 'font face="verdana,arial,helvetica" size="2"';
$font_title = 'font face="verdana,arial,helvetica" size="4"';

# Authorization Options
# --------------------------------------------------------
# No Authentication? (1 = "there is no authentication", 0 = "there is authentication")
# If you choose no authentication, then set the permissions of what
# people can do with: @auth_default_permissions below.
$auth_no_authentication = 0;

# The amount of time in seconds that user files are kept in the
# auth directory before the program removes them. 2-6 hours is
# probably a good value.
$auth_time = 21600; # 6 hours (in seconds)

# Enable (1) or disable (0) logging.
$auth_logging = 1;

# Allow a default user? This means you can specify a user via the URL
# and skip the logon process. Use this to allow people to search without
# logging on, but require log in if they want to add/modify/remove etc.
# (1 = "yes", 0 = "no")
$auth_allow_default = 1;

# Default permissions used if there is no authentication, or for a default
# user. (View, Add, Delete, Modify, Admin), 1 = enable, 0 = disable.
@auth_default_permissions = (1,0,0,0,0);

# Allow people to sign up for their own userid/passwords? They will
# recieve default permissions.
$auth_signup = 0;

# Permissions a new signup should get.
@auth_signup_permissions = (1,1,1,1,0);

# Registered users: can modify/delete _only_ own records. For this to make
# sense you should set default off or to 1,0,0,0.
$auth_modify_own = 0;

# Registered users: can view _only_ own records. For this to make sense
# you should turn off default permissions.
$auth_view_own = 0;

# Auth user field. This is the field position in the database used for storing
# the userid who owns the record. Set to -1 if not used.
$auth_user_field = -1;

# URL to send user if they chose log off. Leave blank and the script will return to
# the logon prompt (although this only makes sense if you are using authentication).
$auth_logoff = "http://www.gossamer-threads.com/scripts/dbman/";

# ===========================================================================
# Build up some variables from your definitions. Internal use only.
foreach (sort { $db_def{$a}[0] <=> $db_def{$b}[0] } keys %db_def) {
push (@db_cols, $_);
$db_sort{$_} = $db_def{$_}[1];
$db_form_len{$_} = $db_def{$_}[2];
$db_lengths{$_} = $db_def{$_}[3];
$db_not_null{$_} = $db_def{$_}[4];
$db_defaults{$_} = $db_def{$_}[5];
$db_valid_types{$_} = $db_def{$_}[6];
($_ eq $db_key) and $db_key_pos = $db_def{$_}[0];
}
1;


--

The fields left blank are Card Name, Set, Color, Card Type, Casting Cost, Power/Toughness, Artist, and Rarity. Price, ID, and Card Text are as they should be.

Any ideas? Any help is much appreciated. Thanks!
Quote Reply
Re: Problems modifying records.. In reply to
I noticed that you have auto generate turned off. Make sure that the names of the fields you have built are named correctly. (Case sensitive)

------------------
WFMY-TV Webmaster
Quote Reply
Re: Problems modifying records.. In reply to
I put all the fields in all caps, but am still having the same problem. Frown Auto-generate gets it to work fine though, but I'd much rather figure out what's going on here.

I find it odd that the ONLY field it is picking up are the numerical fields - all of the 'alpha' fields are the ones that are missing. Reason for this, or just a coincidence?
Quote Reply
Re: Problems modifying records.. In reply to
The problem is in your html.pl file. Please save this file as a text file, like html.txt, upload it to a publicly accessible directory on your server, and then post the URL where we can find the file. So, we can check out the file.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: Problems modifying records.. In reply to
It can be found at:

http://www.e-league.org/html.txt

Thanks!
Quote Reply
Re: Problems modifying records.. In reply to
Capitalizing field names does absolutely...NOTHING.

Smile

Well, I could not find anything wrong with your html.pl file. Odd...very odd.

Hmm...

Regards,


------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: Problems modifying records.. In reply to
The problem is in the " you have around each field. What is the purpose for this? If you look at the source when you go to modify, the values are there, they just aren't showing up because of the ".

Example I pasted from your source:
Code:
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="150"><Font face="Verdana, Arial, Helvetica" Size=2 Color=#003399>Card Name:</FONT></TD>
<TD VALIGN="TOP" WIDTH="475"> <INPUT TYPE="TEXT" NAME="CARDNAME" VALUE=""Aesthir Glider (1)"" SIZE="30" MAXLENGTH="30"></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP"><Font face="Verdana, Arial, Helvetica" Size=2 Color=#003399>Set:</FONT></TD>
<TD VALIGN="TOP"> <INPUT TYPE="TEXT" NAME="SET" VALUE=""AL"" SIZE="10" MAXLENGTH="10"></TD></TR>

<TR><TD ALIGN="Right" VALIGN="TOP"><Font face="Verdana, Arial, Helvetica" Size=2 Color=#003399>Color:</FONT></TD>
<TD VALIGN="TOP"> <INPUT TYPE="TEXT" NAME="COLOR" VALUE=""Art"" SIZE="10" MAXLENGTH="10"></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP"><Font face="Verdana, Arial, Helvetica" Size=2 Color=#003399>Card Type: </FONT></TD>
<TD VALIGN="TOP"> <INPUT TYPE="TEXT" NAME="CARDTYPE" VALUE=""Artifact Creature"" SIZE="20" MAXLENGTH="20"></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP"><Font face="Verdana, Arial, Helvetica" Size=2 Color=#003399>Cost: </FONT></TD>
<TD VALIGN="TOP"> <INPUT TYPE="TEXT" NAME="COST" VALUE=""3"" SIZE="10" MAXLENGTH="10"></TD>

</TR>

If you must have these quotes around each field, just do it when you view the db, do not add it to the db this way.



------------------
WFMY-TV Webmaster
Quote Reply
Re: Problems modifying records.. In reply to
Yeah.. I thought I'd just get everything all one case to make sure I didn't screw up anywhere.

Grr.. this is driving me nuts. Is there any way I can capture what is being auto-generated to see how it's different from what I have?

Any other ideas would be appreciated.. thanks.
Quote Reply
Re: Problems modifying records.. In reply to
FYI, this is running on Sun OS, perl 5.005_03.

I made the default.cfg file available as well, you can view that at:

http://www.e-league.org/default.txt
http://www.e-league.org/html.txt

The ID, Price, and Card Text fields are the only ones showing up when I go to modify an entry.

If someone needs more details or needs access to login to the database and poke around, I'd be happy to give it. Please let me know.

Thanks!
Quote Reply
Re: Problems modifying records.. In reply to
I should not be able to go to http://www.e-league.com/blackrockcards/cgi-bin/dbman/ and see the list of files. Make sure you have the permissions set correctly on this directory.

------------------
WFMY-TV Webmaster