My view_success sub is printing, but is not showing any field values. My other subs work fine.
I'm using the Short/Long mod.
My sub html_record looks like this:
sub html_record {
my (%rec) = @_;
$rec{'url'} =~ s/<.?B>//g;
# 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';
$rec{$db_key} =~ s/<.?B>//g;
print qq|
<TR>
<TD width=400>$rec{'description_short'} </TD>
<TD width=100>$rec{'save_short'} </TD>
<TD width=180>$rec{'store'} </TD>
<TD width=50>$rec{'town'} </TD>
<TD width=40>$rec{'endmonth'}/$rec{'endday'}</TD>
<TD width=20><a href="$db_script_link_url&ww=on&$db_key=$rec{$db_key}&view_records=1" align="bottom" valign="bottom"><img src="../moreinfo.jpg"></A><TD>
</TR>
|;
}
===========================
My view_success looks like this:
sub html_view_success {
my (@hits) = @_;
my ($numhits) = ($#hits+1) / ($#db_cols+1);
my ($maxhits); $in{'mh'} ? ($maxhits = $in{'mh'}) : ($maxhits = $db_max_hits);
if ( $db_total_hits == 1 ) {
%rec = &array_to_hash(0, @hits);
&html_print_headers;
print "<HTML><HEAD><TITLE>$rec{'orgname'} lll $rec{'description'}</TITLE>";
&html_record_long(%rec);
&html_record_long_tag;
return;
}
&html_print_headers;
&html_page_top_flat;
print qq|
<br>
Your search returned <b>$db_total_hits</b> matches.</font><p>
<table><tr>
<td width=400><u><b>Item</b></u></td>
<td width=100><u><b>Savings</b></u></td>
<td width=180><u><b>Store</b></u></td>
<td width=50><u><b>Town</b></u></td>
<td width=40><u><b>Ending</b></u></td>
<TD width=20> <TD>
</tr></table>
|;
if ($db_next_hits) {
print "<br><$font>Pages: $db_next_hits</font>";
}
# Go through each hit and convert the array to hash and send to
# html_record for printing.
print "<P><TABLE>";
for (0 .. $numhits - 1) {
print "<TR>";
&html_record(&array_to_hash($_, @hits));
print "</TR>";
}
print "</TABLE>";
if ($db_next_hits) {
print "<br><$font>Pages: $db_next_hits</font>";
}
=========================
Thanks for any help you can give me.
-Rick
I'm using the Short/Long mod.
My sub html_record looks like this:
sub html_record {
my (%rec) = @_;
$rec{'url'} =~ s/<.?B>//g;
# 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';
$rec{$db_key} =~ s/<.?B>//g;
print qq|
<TR>
<TD width=400>$rec{'description_short'} </TD>
<TD width=100>$rec{'save_short'} </TD>
<TD width=180>$rec{'store'} </TD>
<TD width=50>$rec{'town'} </TD>
<TD width=40>$rec{'endmonth'}/$rec{'endday'}</TD>
<TD width=20><a href="$db_script_link_url&ww=on&$db_key=$rec{$db_key}&view_records=1" align="bottom" valign="bottom"><img src="../moreinfo.jpg"></A><TD>
</TR>
|;
}
===========================
My view_success looks like this:
sub html_view_success {
my (@hits) = @_;
my ($numhits) = ($#hits+1) / ($#db_cols+1);
my ($maxhits); $in{'mh'} ? ($maxhits = $in{'mh'}) : ($maxhits = $db_max_hits);
if ( $db_total_hits == 1 ) {
%rec = &array_to_hash(0, @hits);
&html_print_headers;
print "<HTML><HEAD><TITLE>$rec{'orgname'} lll $rec{'description'}</TITLE>";
&html_record_long(%rec);
&html_record_long_tag;
return;
}
&html_print_headers;
&html_page_top_flat;
print qq|
<br>
Your search returned <b>$db_total_hits</b> matches.</font><p>
<table><tr>
<td width=400><u><b>Item</b></u></td>
<td width=100><u><b>Savings</b></u></td>
<td width=180><u><b>Store</b></u></td>
<td width=50><u><b>Town</b></u></td>
<td width=40><u><b>Ending</b></u></td>
<TD width=20> <TD>
</tr></table>
|;
if ($db_next_hits) {
print "<br><$font>Pages: $db_next_hits</font>";
}
# Go through each hit and convert the array to hash and send to
# html_record for printing.
print "<P><TABLE>";
for (0 .. $numhits - 1) {
print "<TR>";
&html_record(&array_to_hash($_, @hits));
print "</TR>";
}
print "</TABLE>";
if ($db_next_hits) {
print "<br><$font>Pages: $db_next_hits</font>";
}
=========================
Thanks for any help you can give me.
-Rick