Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

query -> number of results

Quote Reply
query -> number of results
I have a global to search Links table and it works fine.

sub {
my $tags = shift;
my $query = $tags->{query};
my $search_db = $DB->table('Links');
$search_db->select_options ("ORDER BY $CFG->{build_sort_order_category}");

my $sth = $search_db->query_sth ( {
isValidated => 'Yes',
query => $query,
ma => 1,
nh => 1,
mh => 10
} );

my @output;
while (my $link = $sth->fetchrow_hashref) {
push (@output, $link);
}
return { query_search_results_loop => \@output };
}


On site i use:

<%name_of_the_global%>

<%loop query_search_results_loop%>
<%include link.html%>
<%endloop%>




My problem is:

I have limited the number of results to 10 (with mh => 10)
but I would like to know the number of available results if the number exceeds 10.

Thanks in advance!

Last edited by:

Payooo: Nov 7, 2006, 12:32 PM
Subject Author Views Date
Thread query -> number of results Payooo 2589 Nov 7, 2006, 12:31 PM
Post Re: [Payooo] query -> number of results
Payooo 2482 Nov 11, 2006, 2:11 AM
Post Re: [Payooo] query -> number of results
Andy 2467 Nov 11, 2006, 12:16 PM