You say the short view doesn't print out and no matter how many records are returned, you get the long view? (Anyway, that's the way I understood your problem to be.)
Just for debugging purposes, try commenting out the lines that refer to html_record -- so the lines in html_view_succes would look like:
Code:
# if ( $db_total_hits == 1 ) {
# &html_record(&array_to_hash($_, @hits));
# return;
# }
See what happens then.
Another possible problem I see (but it wouldn't result in the problem you're having) is too many table tags in your html_record_short display.
You have
Code:
print "<CENTER><TABLE>";
for (0 .. $numhits - 1) {
&html_record_short (&array_to_hash($_, @hits));
}
print "</TABLE></CENTER>";
and then your html_record_short is
Code:
print qq|
<TABLE WIDTH="100%" CELLPADDING=0 CELLSPACING=0 BORDER=0 BGCOLOR="#FFFFCC">
<TR><TD>
...
</TD>
</TR>
</TABLE>
|;
You should either take out the table tags in html_view_success, or at least add <TR><TD> tags after the <TABLE> tag and </TD></TR> tags before the </TABLE> tag. Or you could take out the <TABLE> and </TABLE> tags in html_record_short.
At this point, the tags in html_view_success aren't doing any good and could be causing problems.
Is there any way I could directly access your database so I could see it myself? If you don't want to post it here, you can send it to me privately at
hall@drizzle.com .
------------------
JPD