Gossamer Forum
Home : Products : DBMan : Installation :

not showing field values

Quote Reply
not showing field values
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'}&nbsp;</TD>
<TD width=100>$rec{'save_short'}&nbsp;</TD>
<TD width=180>$rec{'store'}&nbsp;</TD>
<TD width=50>$rec{'town'}&nbsp;</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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<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

Quote Reply
Re: [rdavis] not showing field values In reply to
Did you start out with the short/long mod or did you convert the original dbman to the short/long mod?

You have several things missing in your html_record and the codes are very scrambled in the view_success.

If you followed the instructions to convert to the short/long mod, please go back and be sure you have made all the necessary changes. Then follow the instructions to place any headers you want displayed for use in the short display.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] not showing field values In reply to
I converted the original dbman to the short/long mod.

I think I might have misled you. My records show up fine on the short display; it's the records on the long display that are not appearing.

I know the problem is not in html_record_long, because add_success and modify_success display the records perfectly.

So, when I first do a search, my short display comes up, and when I click the link to the long display, the basic html of the long display appears, but without any fields showing.

Thanks Lois.

-Rick