Gossamer Forum
Home : Products : DBMan : Customization :

Relational pains

(Page 2 of 2)
> >
Quote Reply
Re: Relational pains In reply to
I'm going to have to look at all your files. I'm completely confused. Smile



------------------
JPD






Quote Reply
Re: Relational pains In reply to
LOL!!
Smile
If you point your browser to: http://www.thesmallvault.freeserve.co.uk/

You'll get a listing of the files.
Thanks!!
Rob
Quote Reply
Re: Relational pains In reply to
Thank you! I found out I was wrong about something. W - R - O - N - G ! ! ! ! About as wrong as I can get!!!!

Okay. I've got that out of my system. Smile

In your "switch_to..." subroutines, you'll need to change the way they're set up.

Instead of

Code:
sub switch_to_agency {
#-----------------------------------------------------
@db_cols = qw('UserID' 'AgentID' 'Agent name' 'Agent address' 'Agent postcode' 'Agent telephone number' 'Agent fax number' 'Agent email address' 'Agent Invoice Address and Postcode');
$db_file_name = $db_script_path . "/agency.db";
}

use

Code:
sub switch_to_agency {
#-----------------------------------------------------
$cols = 'UserID,AgentID,Agent name,Agent address,Agent postcode,Agent telephone number,Agent fax number,Agent email address,Agent Invoice Address and Postcode';
@db_cols = split (/,/, $cols);
$db_file_name = $db_script_path . "/agency.db";
}

Do the same thing with the other ones. Change @db_cols to $cols, put single quotes around the whole list of field names, separate field names with just a comma and add a line

@db_cols = split (/,/, $cols);

after the field list.

In your switch_to_user subroutine, be sure you have all the fieldnames on one line, no matter how long it makes the line.

Give that a try and see how it works.

(Boy, I can't believe how wrong I was!!!)


------------------
JPD


[This message has been edited by JPDeni (edited April 25, 2000).]
Quote Reply
Re: Relational pains In reply to
Why do I feel like a naughty school boy?
I guess I've proved the old support adage haven't I? I though I was saving time with the field names, but looks like it was not the case...am I on the right track?? Put me out of your misery Smile
Thanks again, you are very very good at this, well done.
Now to amend the footer to link back and forth!!!!
> >