summaryrefslogtreecommitdiffstats
path: root/frontends/php/items.php
diff options
context:
space:
mode:
Diffstat (limited to 'frontends/php/items.php')
-rw-r--r--frontends/php/items.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/frontends/php/items.php b/frontends/php/items.php
index e102fac7..d9a50c3d 100644
--- a/frontends/php/items.php
+++ b/frontends/php/items.php
@@ -340,8 +340,9 @@
?>
<?php
- $result=DBselect("select count(*) from hosts");
- if(DBget_field($result,0,0)>0)
+ $result=DBselect("select count(*) as cnt from hosts");
+ $row=DBfetch($result);
+ if($row["cnt"]>0)
{
echo "<a name=\"form\"></a>";
insert_item_form();