From a9fcec00f5ce8eb3c35e050e2ba31d7d4f5bef8b Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 16 Aug 2021 18:26:41 -0400 Subject: [PATCH] sql --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 106db55..1fbdef7 100644 --- a/main.go +++ b/main.go @@ -125,8 +125,8 @@ func loadDbEntries(ot string, id int64) map[string]metadataValues { log.Printf("Invalid object type: %s", ot) return entries } - query:=fmt.Sprintf("select meta_key, meta_value from %s where ? = ?", table) - rows,err:=db.Query(query, column, id) + query:=fmt.Sprintf("select meta_key, meta_value from %s where %s = ?", table, column) + rows,err:=db.Query(query, id) if err != nil { log.Printf("db.Query: %s\n", err.Error()) return entries