From d6bc097e6974c0ba8f7ff74b9f8a86ba5addf036 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期二, 25 七月 2023 10:52:52 +0800 Subject: [PATCH] 1 --- ExportMap/db/PubDBHelper.cs | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ExportMap/db/PubDBHelper.cs b/ExportMap/db/PubDBHelper.cs index 5f60ebb..bc1ffca 100644 --- a/ExportMap/db/PubDBHelper.cs +++ b/ExportMap/db/PubDBHelper.cs @@ -100,9 +100,10 @@ /// </summary> public static int UpdatePublishCoord(int pid, string json) { - string sql = string.Format("update lf.sys_publish set json = '{0}' where id = {1}", json, pid); + string sql = string.Format("update lf.sys_publish set json = @json where id = {0}", pid); + DbParameter dp = new NpgsqlParameter("@json", json); - return Tools.DBHelper.ExecuteNonQuery(sql); + return Tools.DBHelper.ExecuteNonQuery(sql, dp); } /// <summary> -- Gitblit v1.9.3