diff --git a/html/ops/db.inc b/html/ops/db.inc
index c18575bea0..26e7c2217d 100644
--- a/html/ops/db.inc
+++ b/html/ops/db.inc
@@ -174,7 +174,7 @@ function show_result($result,$show_xml_docs,$show_stderr,$show_times) {
}
row("Name", $result->name);
row("Workunit", "workunitid>" . wu_name_by_id($result->workunitid) . "" );
- row("state", res_state_string($result->state));
+ row("state", res_state_string($result->server_state));
row("Deadline", time_str($result->report_deadline));
row("Host ID", "hostid>" . host_name_by_id($result->hostid) . "");
row("Client State", $result->client_state);
diff --git a/html/ops/db.php b/html/ops/db.php
index 9b0e7a637a..09808b3157 100644
--- a/html/ops/db.php
+++ b/html/ops/db.php
@@ -65,8 +65,8 @@
}
if (strlen($result_state) && $result_state != 0) {
- $query = append_sql_query( $query, "state = $result_state", $first );
- $english_query = append_sql_query( $english_query, "state is ".res_state_string($result_state), $first );
+ $query = append_sql_query( $query, "server_state = $result_state", $first );
+ $english_query = append_sql_query( $english_query, "server state is ".res_state_string($result_state), $first );
$rstate = $result_state;
$first = 0;
} else {