Hi, (esp. JPDENI)
I'm using your random routine:
if ($in{'random'}) {
#srand ( );
$values[25]=int(rand(1000)) + 1;
$in{'sb'} = 25;
}
In html.pl I'm using the short-dsiplay:
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);
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>......
Settings:
30 records, maxhits=10
the first 10 hits: random is o.k.
but:
when I go to next 10 hits, random starts again and sometimes a record from the first 10 hits appears again in the next 10 hits?
the query string is
...db.cgi?db=deafault&uid=default&random=1&ID=&andsoon....
any hints for stopping the random, when I go to "...next hits" ?
thanks in advance!
HP
[This message has been edited by hanspeter (edited August 09, 1999).]
I'm using your random routine:
if ($in{'random'}) {
#srand ( );
$values[25]=int(rand(1000)) + 1;
$in{'sb'} = 25;
}
In html.pl I'm using the short-dsiplay:
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);
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>......
Settings:
30 records, maxhits=10
the first 10 hits: random is o.k.
but:
when I go to next 10 hits, random starts again and sometimes a record from the first 10 hits appears again in the next 10 hits?
the query string is
...db.cgi?db=deafault&uid=default&random=1&ID=&andsoon....
any hints for stopping the random, when I go to "...next hits" ?
thanks in advance!
HP
[This message has been edited by hanspeter (edited August 09, 1999).]