From 7b7bbada9418f49dda2c9a2b4c786d5e886495e3 Mon Sep 17 00:00:00 2001 From: poopki Date: Mon, 11 Jul 2022 00:37:14 +0900 Subject: [PATCH] =?UTF-8?q?SQL=20Bug=20-=20STMT=20=EB=A9=94=EC=84=B8?= =?UTF-8?q?=EC=A7=80=20=EC=A4=91=EB=B3=B5=20=EB=82=A0=EB=A6=AC=EB=A9=B4=20?= =?UTF-8?q?SQL=20=EB=AC=B8=EB=B2=95=EC=98=A4=EB=A5=98=20=EB=B0=9C=EC=83=9D?= =?UTF-8?q?=20=ED=95=B4=EA=B2=B0=20=ED=95=84=EC=9A=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DB/DBUpdate.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/DB/DBUpdate.java b/DB/DBUpdate.java index e32d64d..5ee87cb 100644 --- a/DB/DBUpdate.java +++ b/DB/DBUpdate.java @@ -30,19 +30,20 @@ public class DBUpdate { System.out.println("Connection success"); stmt = conn.createStatement(); StringBuilder sb = new StringBuilder(); - String sql = sb.append("create table if not exists UserInfo(") - .append("UUID varchar(36)") -/* .append("Nation int,") + /* String sql = sb.append("create table if not exists UserInfo(") + .append("UUID varchar(36),") + .append("Nation int(8)") .append("Occupation TINYINT,") .append("Squad int,") .append("Farm int,") - .append("Account int,")*/ + .append("Account int,") .append(")").toString(); stmt.execute(sql); + */ for (UUID key : m_InfoArrayInstance.m_UserInfoArray.keySet()) { //sql = sb.append("insert into UserInfo values('"+key+"',"+0+","+0+","+0+","+0+","+0+")").toString(); - sql = sb.append("insert into UserInfo (UUID) value ('"+key.toString()+ "')").toString(); + String sql = sb.append("insert into UserInfo values ('test', 0)").toString(); stmt.execute(sql); } }