diff options
author | iximeow <me@iximeow.net> | 2023-07-04 14:27:17 -0700 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2023-07-04 14:27:17 -0700 |
commit | bdaacf767f48702fbdf23b7cf0baebfed9e4d78b (patch) | |
tree | 53cfacdb0639e14010b9b52b0a5ec06edeca78fc | |
parent | d0e845d3ac4530cf281e90d8a3634355d153c8be (diff) |
fix host info query
-rw-r--r-- | src/dbctx.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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(), |