Gossamer Forum
Home : Products : DBMan : Customization :

sorting radio fields contd.

(Page 2 of 2)
> >
Quote Reply
Re: [kellner] sorting radio fields contd. In reply to
Well, I'm not exactly sure, since I am still learning perl, but the little slashes & everything are mighty impressive. :)

So, exactly where would I put this code? Crazy And, by using that code you wrote you are you saying if I had something like 1Duke,2Count,3Herald,4Baron - when I use that code the # will drop off when it prints the results?


Diana Rae
Quote Reply
Re: [dianarae] sorting radio fields contd. In reply to
Use the code exactly before printing $rec{'Rank'}.
And, yes, it removes the # from the beginning.
kellner
Quote Reply
Re: [kellner] sorting radio fields contd. In reply to
Use the code exactly before printing $rec{'Rank'}.
And, yes, it removes the # from the beginning.
kellner


-----------------------------------------

sub html_record {
# --------------------------------------------------------
# How a record will be displayed. This is used primarily in
# returning search results and how it is formatted. The record to
# be displayed will be in the %rec hash.

my (%rec) = @_; # Load any defaults to put in the VALUE field.
($db_auto_generate and print &build_html_record(%rec) and return);

my $font_color = 'Font face="Verdana, Arial, Helvetica" Size=2 Color=#003399';
my $font = 'Font face="Verdana, Arial, Helvetica" Size=2';

$url{'Email'} = $rec{'Email'};
$url{'Email'} =~ s/<\/?B>//g;

print qq|
<TABLE WIDTH="475" CELLPADDING=0 CELLSPACING=0 BORDER=1

BGCOLOR="#FFFFCC">|;
if ($per_admin) {
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>ID:</FONT></TD>
<TD WIDTH="80%">&nbsp;<$font>$rec{'ID'}</Font></TD></TR>
|;
}
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>Name:</FONT></TD>
<TD WIDTH="80%">&nbsp;<$font>$rec{'Name'}</Font></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>Email:</FONT></TD>
<TD WIDTH="80%">&nbsp;<$font><a href="mailto:$url{'Email'}">$rec{'Email'}</a>|;
if ($rec{'Rank'} =~ /^(\d)(\w+)$/) { $rec{'Rank'} = $2;}) {
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>Rank:</FONT></TD>
<TD WIDTH="80%">&nbsp;<$font>$rec{'Rank'}</Font></TD></TR>
|;
}
print qq|
</TABLE>
|;
}

--------------------------------------------------------

This is just a little test I did. The test functioned until I put that string in. Then when I put that string in I can the "DB man has encountered an internal error" notice when I try to access the database. Did I put the string in the wrong place? Unsure


Diana Rae
Quote Reply
Re: [dianarae] sorting radio fields contd. In reply to
Try removing the closing round bracket and the opening braces after "$rec{'Rank'} = $2;}". There shouldn't be anything in this line after this code.
kellner
> >