Gossamer Forum
Home : Products : DBMan : Customization :

SSI call short display

Quote Reply
SSI call short display
im trying to configure my site that it calls the data from database through ssi and then you have option to display one record on the page but i cant get it to work. it gives me 500 all the time. even the same thing works nice without ssi call.
Quote:
sub html_view_success_ssi {

my ($i);
my (@hits) = @_;
my ($numhits) = ($#hits+1) / ($#db_cols+1);
my ($count) = ($numhits);
my ($maxhits); $in{'mh'} ? ($maxhits = $in{'mh'}) : ($maxhits = $db_max_hits);

print "<table>";
for (0 .. $numhits - 1) {
print "<tr>";
if($count && $i > $count-1) { last; }
print "</tr>";
$i++;

&html_record_ssi (&array_to_hash($_, @hits));
}
}
what could be wrong?
thanks
Quote Reply
Re: SSI call short display In reply to
This line should actually be two lines:

my ($maxhits); $in{'mh'} ? ($maxhits = $in{'mh'}) : ($maxhits = $db_max_hits);

my ($maxhits);
$in{'mh'} ? ($maxhits = $in{'mh'}) : ($maxhits = $db_max_hits);

How are you calling the include statement from your page?

Are you following the instructions from this thread?

http://www.gossamer-threads.com/scripts/forum/resources/Forum12/HTML/001348.html
Quote Reply
Re: SSI call short display In reply to
it works fine for multiple table display
im using php and calling it
Quote:
<?
virtual("../cgi-bin/db/tele/db.cgi?db=default&uid=default&ID=*&sb=0&so=descend&mh=10&view_records_ssi=View+Records");
?>
it works nice when i have multiple tables for each record but when i want to display all of them in compact table it doesnt work.
and yes i used that resource that you pointed for ssi -->
http://www.gossamer-threads.com/scripts/forum/resources/Forum12/HTML/001348.html
Quote Reply
Re: SSI call short display In reply to
i tried your suggestion put it in two lines but still doesnt work what could be wrong ?
Quote:
########### R E C O R D _ S S I ########################

sub html_record_ssi {

my (%rec) = @_;
my $font_color = 'font face="Arial, Helvetica, sans-serif" size=-2 color=#808080';
my $font = 'font size=1';

print qq|
<TD bgcolor="#CCFFCC"><$font>Category:<$font_color>$rec{'Type'}</font></FONT></TD>
<TD colspan="2" bgcolor="#ffffff"> <$font_color><b>$rec{'Review'}</b></Font></TD>
<td colspan="2" bgcolor="#ffffff"> <$font_color>Additional info: added $rec{'Date'}<br>$rec{'Remarks'}</font></td>
|;
}

############ V I E W _ S U C C E S S _ S S I ########################

sub html_view_success_ssi {

my ($i);
my (@hits) = @_;
my ($numhits) = ($#hits+1) / ($#db_cols+1);
my ($count) = ($numhits);
my ($maxhits);
$in{'mh'} ? ($maxhits = $in{'mh'}) : ($maxhits = $db_max_hits);

print "<table>";
for (0 .. $numhits - 1) {
print "<tr>";
if($count && $i > $count-1) { last; }
print "</tr>";
$i++;

&html_record_ssi (&array_to_hash($_, @hits));
}
print "</table>";
}
Quote Reply
Re: SSI call short display In reply to
I'm sorry but I have not played this mod myself so I am unable to provide help Frown

Perhaps if you sent an email to the creator of this mod they may be able to assist you with some answers.

I hope you do find a solution and wish you luck.