From bdaacf767f48702fbdf23b7cf0baebfed9e4d78b Mon Sep 17 00:00:00 2001 From: iximeow Date: Tue, 4 Jul 2023 14:27:17 -0700 Subject: fix host info query --- src/dbctx.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dbctx.rs b/src/dbctx.rs index 0c7d488..3fa65e8 100644 --- a/src/dbctx.rs +++ b/src/dbctx.rs @@ -669,7 +669,7 @@ impl DbCtx { pub fn host_model_info(&self, host_id: u64) -> Result<(String, String, String, String), String> { let conn = self.conn.lock().unwrap(); conn - .query_row("select hostname, cpu_vendor_id, cpu_family, cpu_model from hosts;", [host_id], |row| { + .query_row("select hostname, cpu_vendor_id, cpu_family, cpu_model from hosts where id=?1;", [host_id], |row| { Ok(( row.get(0).unwrap(), row.get(1).unwrap(), -- cgit v1.1