Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Column Reversal?

Quote Reply
Column Reversal?
I recently added a new column in one of my tables...the problem is that no matter what I do to edit the column, the fields/columns switch values...

The new field I added was "Username" and the field that it switches values with is the "Email Field".

Here is my .def file:

Code:

package AG::DBSQL::tbl_AG_Person;

$db_name = 'anthrotech4';
$db_host = 'localhost';
$db_driver = 'mysql';
$db_user = 'anthrotech';
$db_pass = '';
$db_key = 'PersonID';
$db_primkey = '';
$db_loginkey = 'Username';
$db_table = 'tbl_AG_Person';
$db_track = '1';
$attach_dir = '';

%db_def = (
PersonID => ['1', 'INT', '10', '20', '1', '0', '^\d*\.?\d*$'],
FirstName => ['2', 'TEXT', '25', '100', '0', '', ''],
LastName => ['3', 'TEXT', '25', '100', '0', '', ''],
Person_Title => ['4', 'TEXT', '25', '255', '0', '', ''],
Username => ['5', 'CHAR', '25', '25', '0', '', ''],
Email => ['6', 'TEXT', '25', '100', '1', '', '.+\@.+\..+'],
Password => ['7', 'TEXT', '25', '15', '0', '', ''],
MailingAddress => ['8', 'TEXT', '25', '255', '0', '', ''],
CountryID => ['9', 'INT', '10', '20', '0', '', ''],
State => ['10', 'TEXT', '25', '255', '0', '', ''],
City => ['11', 'TEXT', '25', '255', '0', '', ''],
PostalCode => ['12', 'TEXT', '25', '255', '0', '', ''],
Biography => ['13', 'LONGTEXT', '40x3', '', '0', '', ''],
Picture => ['14', 'TEXT', '25', '255', '0', '', ''],
Validation => ['15', 'CHAR', '', '20', '0', '', ''],
Registered => ['16', 'ENUM', '0', '1', '1', 'N', 'Y|N'],
DateRegistered => ['17', 'DATE', '20', '20', '1', 'NOW', '^\d{4}\-\d{2}\-\d{2}$'],
ShowEmail => ['18', 'ENUM', '0', '1', '1', 'N', 'Y|N']
);

%db_select_fields = ( Registered => 'Y,N',
ShowEmail => 'Y,N');
%db_checkbox_fields = ();
%db_radio_fields = ();
1;


NOTE: I added some additional variables (e.g., $db_loginkey, $db_primkey) for different subs I added to the DBSQL.pm file. This caused no problem before...

Also, I did not make any changes to the build_html_record routine...so don't know why there are problems in the admin.cgi script...Also, the template files for the Edit Account script look fine with the proper column names.

The strange thing is that when I look at the records via MySQLMan, the columns look fine, but when I open the records via admin.cgi script, the two columns reverse themselves. In addition, when I access test records via the Edit account script (editacct.cgi), the same thing happens, the values are reversed.

Example:

If I have username1 in the Username field, it shows up in the Email field...and the Email field value shows up in the Username field.

Anyone seen this before??? Any insight would be helpful.

Thanks!

Regards,

Eliot Lee
Quote Reply
Re: Column Reversal? In reply to
Very strange...when I edit records via the Edit Account script, the Username and Email field values show up correctly both in the CONFIRMATION screen and also in the confirmation email message sent to the user.

This has me really stumped...any suggestions would be greatly appreciated.

Thanks in advance.

Regards,

Eliot Lee
Quote Reply
Re: Column Reversal? In reply to
---> Bump to Top <---

Thanks in advance for any advice.

Regards,

Eliot Lee