Gossamer Forum
Home : Products : DBMan : Installation :

List all not working and configurator not working properly

Quote Reply
List all not working and configurator not working properly
Frown I have used this script time and time again with excellent results. However, during this particular installation the list all function is not working unless you select a parameter. Then, it will list all the records that meet that selected parameter. From what I understand, the LIST ALL function is suppose to do just that, LIST ALL the records, correct?

I did use JPDeni's configurator and there seems to be a problem with it in the html file. It is inserting the "print" function after every table entry in the sub_html_record. It is a simple matter of comparing that one to the original one and deleting these additional print functions. <shrugs>

I have made the key as the badge number. I tried changing the config file to BOTH track the key and NOT track the key. The badge number has been formated to need a minimum of 4 characters I believe, maybe 5.

This database is located a http://www.dpenterprises.org/...ntergov/dbman/db.cgi

Here is what my changed files are. All other files are the same as in the original zip file. Can someone please help me figure out what the problem is here?

Thanks in advance!

Last edited by:

LoisC: Aug 30, 2002, 9:43 AM
Quote Reply
Re: [treasure] List all not working and configurator not working properly In reply to
Sorry, but I removed all the code you inserted into your thread. PLEASE if you want someone to look at your code make a .txt file of each of your files and provide the url to where they can be seen.

It's difficult to scan through all the lines within the post to locate errors.

From looking at your .cfg file I would say you may be having problems due to symbols being used with your field names such as the # and ?:

'Badge#' => [ 0, 'numer', 20, 255, 1, '', '\d{4}'],
'Minor?' => [13, 'alpha', 0, 3, 0, 'No', ''],

Try removing those and see if it makes a difference.

Also the configurator has always added extra coding, you just have to use this as a guide and then clean up the coding.

Hope this helps

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] List all not working and configurator not working properly In reply to
The # *may* be ok but the ? could definitely cause probs as ?'s are used in query strings and RFC states they should be escaped.

Last edited by:

Paul: Aug 30, 2002, 10:02 AM
Quote Reply
Re: [LoisC] List all not working and configurator not working properly In reply to
Hmmm. Took out the # after badge and the ? after minor, uploaded and still the same.

Attached are the files. Any help with this would be appreciated!!

The url to view this is http://dpenterprises.org/...ntergov/dbman/db.cgi

Last edited by:

treasure: Aug 30, 2002, 1:44 PM
Quote Reply
Re: [treasure] List all not working and configurator not working properly In reply to
You don't have default user setup to be able to view your database, nor to you provide the option to signup.

Recheck all your field names and remove the spaces between the ending ' such as:

'Badge ' => [ 0, 'numer', 20, 255, 1, '', '\d{4}'],

should be:

'Badge' => [ 0, 'numer', 20, 255, 1, '', '\d{4}'],

You've done the same with the checkboxes


You also have the same problems with your add_form and display form. For example:

("Scam Watch ",$rec{'Scam Watch '})

Notice the extra spaces before the " and '?

Check over all your coding and I'm sure that will help to solve your errors.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] List all not working and configurator not working properly In reply to
Ok, I "hacked" that into compliance, but now a new problem has cropped up. It wont add a record. Says that I am leaving the key field, which is the badge field, blank. I have tried to put in text and numbers to no avail.
Quote Reply
Re: [treasure] List all not working and configurator not working properly In reply to
Are you sure you loaded the fixed copies? The same problems exist with spaces in the field names. You also have in your .cfg file 'Badge#' again but in yoru add_form you have:

NAME="badge" SIZE="20" VALUE="$rec{'badge'}"

Check carefully once you fix your field list in the .cfg file and make sure that all the fields match exactly to what you have in your add_form.

If you already had records in your db file, then you may also want to check it for extra spaces entered within the fields.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] List all not working and configurator not working properly In reply to
SmileI got it working!

Thanks for all the help!
Quote Reply
Re: [treasure] List all not working and configurator not working properly In reply to
MadARGGGG!!!!

Each time I enter a badge number when I add a record, the script automatically puts in "admin" instead of the number I entered. I CAN go back and modify the record to the correct number, but this is a pain in the arse.

I did change over the key field to the Last Name field since it wasnt allowing me to even modify the badge number from 'admin'.

This script, couple with the configurator, used to be a breeze to setup and get working. Now the configurator seems to be putting in extra spaces and messing up the html file with extra print functions that someone who has never worked on this script before will NOT know how to fix. I was lucky that I figured THAT part out at least. But the reasons behind the new problems are beyond my range of skill. I am NOT a programmer. I do have a general knowledge of how to configure "shelf scripts" for use on my sites though and have been fairly successful at it.



If anyone can help me with this new problem, it would be most appreciated!
Quote Reply
Re: [treasure] List all not working and configurator not working properly In reply to
Your getting admin in the badge field due to having an authorized user field defined and not being used.

You changed:

$auth_user_field = -1;

to:

$auth_user_field = 0;

which would look for the userid field to be in the same position as the badge number.


You still have some extra spaces within the field names:

'Scam Watch ' => [ 4, 'alpha', 0,20, 0,'', ''], - remove space
'Skills ' => [16, 'alpha', '80x10',5000, 0,'',''], - remove space

and in html_record_form

<TD>&nbsp;|; print &build_checkbox_field("Scam Watch ",$rec{'Scam Watch '}); print qq|</TD></TR>
<TEXTAREA NAME="Skills " ROWS="10" COLS="80" WRAP="VIRTUAL" MAXLENGTH="5000">$rec{'Skills '}</TEXTAREA></TD></TR>

Also in sub html_record

change:

$rec{'Notes'} =~ s/\n/<BR>/g;

to:

$rec{'Personnel Notes'} =~ s/\n/<BR>/g;
$rec{'Skills'} =~ s/\n/<BR>/g;

Also if you want the Badge field to be the counter you must set:

$db_key = 'Badge';
$db_key_track = 1;

I don't see anything else that would be causing the problems you are having.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/