diff --git a/html/user/results_host.php b/html/user/results_host.php
index b42be2e000..a080acefe0 100644
--- a/html/user/results_host.php
+++ b/html/user/results_host.php
@@ -4,17 +4,28 @@
require_once("util.inc");
require_once("result.inc");
+ $results_per_page = 20;
+
db_init();
$hostid = $_GET["hostid"];
+ $offset = $_GET["offset"];
+ if (!$offset) $offset=0;
page_head("Results for host");
result_table_start();
$i = 1;
- $result = mysql_query("select * from result where hostid=$hostid order by id desc limit 20");
+ $result = mysql_query("select * from result where hostid=$hostid order by id desc limit $results_per_page offset $offset");
while ($res = mysql_fetch_object($result)) {
show_result_row($res, $i);
$i++;
}
mysql_free_result($result);
echo "\n";
+ if ($i > $results_per_page) {
+ $offset = $offset+$results_per_page;
+ echo "
+