Skip to content

Commit 0cfe290

Browse files
committed
fix in topN function
1 parent 26eb8fe commit 0cfe290

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

customization/www_librarybox/dl_statistics.func.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function dl_read_stat_per_path ($path="%" , $sortBy , $sort, $type="all" , $lim
4242
if ( $type == "all" ) {
4343
$sth = $db->prepare ( " SELECT url, counter FROM dl_statistics WHERE url LIKE :path ORDER by $sortBy $sort ");
4444
} elseif ( $type == "top" ) {
45-
$sth = $db->prepare ( "SELECT url, counter FROM dl_statistics WHERE url LIKE :path ORDER by $sortBy $sort LIMIT 1 , :max ");
45+
$sth = $db->prepare ( "SELECT url, counter FROM dl_statistics WHERE url LIKE :path ORDER by $sortBy $sort LIMIT 0 , :max ");
4646
$sth->bindParam (':max' , $limit, PDO::PARAM_INT );
4747
}
4848

0 commit comments

Comments
 (0)