Hi All
I'm trying to get jump.cgi to do a Random Jump to the Detailed pages (instead of the URL).
What I've found so far is the code in jump.pm:
if (lc $id eq "random") {
my $total = $db->total() - $db->count({ isValidated => 'No' });
my $offset = int rand $total;
$db->select_options ("LIMIT $offset, 1");
my $sth = $db->select ( { isValidated => 'Yes' }, ['URL'] );
($goto) = $sth->fetchrow_array;
}
What I need to figure out is how to adjust this so that it picks up the detail page, not the url.
I see the URL field mentioned, but I haven't found where any URL index is built (like in flatfile Links). What I did in the flatfile version is copy the build_url_index routine and make some changes, rename it build_detail_index, and then create a detail.db in /data/
I'm trying to customize SQL as a storefront or catalog system. So, having random jumps to the detail pages would be neat.
Thanks for any suggestions.
DT
I'm trying to get jump.cgi to do a Random Jump to the Detailed pages (instead of the URL).
What I've found so far is the code in jump.pm:
Code:
# If we are chosing a random link, then get the total and go to one at random. if (lc $id eq "random") {
my $total = $db->total() - $db->count({ isValidated => 'No' });
my $offset = int rand $total;
$db->select_options ("LIMIT $offset, 1");
my $sth = $db->select ( { isValidated => 'Yes' }, ['URL'] );
($goto) = $sth->fetchrow_array;
}
What I need to figure out is how to adjust this so that it picks up the detail page, not the url.
I see the URL field mentioned, but I haven't found where any URL index is built (like in flatfile Links). What I did in the flatfile version is copy the build_url_index routine and make some changes, rename it build_detail_index, and then create a detail.db in /data/
I'm trying to customize SQL as a storefront or catalog system. So, having random jumps to the detail pages would be neat.
Thanks for any suggestions.

DT