Hello,
in html.pl I'm using the following sub for display the results in short form:
###################
# sub html_record_short
###################
sub html_record_short {
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="arial" size=1 color=#003399';
my $font = 'font face="arial" size=1 ';
print qq|
td bgcolor=#F0CC91 font face="verdana, arial" size=1
(a href="$db_script_link_url&ID=$rec{'ID'}&format=long&view_records=1")Details(/a)(/font)(/td)
(td bgcolor=#F4F4F4)
...and so on...
No when I submit "list all" the results always coming in the same sorting.
How can I include a random-routine like this:
sub mix {
my $array = shift;
my $i;
for ($i = @array; --$i
{
my $j = int rand ($i+1);
next if $i == $j;
@array[$i,$j] = @$array[$j, $i];
}
}
...and so on...
any hints?
thanks,
HP
in html.pl I'm using the following sub for display the results in short form:
###################
# sub html_record_short
###################
sub html_record_short {
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="arial" size=1 color=#003399';
my $font = 'font face="arial" size=1 ';
print qq|
td bgcolor=#F0CC91 font face="verdana, arial" size=1
(a href="$db_script_link_url&ID=$rec{'ID'}&format=long&view_records=1")Details(/a)(/font)(/td)
(td bgcolor=#F4F4F4)
...and so on...
No when I submit "list all" the results always coming in the same sorting.
How can I include a random-routine like this:
sub mix {
my $array = shift;
my $i;
for ($i = @array; --$i
my $j = int rand ($i+1);
next if $i == $j;
@array[$i,$j] = @$array[$j, $i];
}
}
...and so on...
any hints?
thanks,
HP

