質問編集履歴

1

ソースコード編集

2020/04/10 16:23

投稿

karakorum
karakorum

スコア20

test CHANGED
File without changes
test CHANGED
@@ -192,7 +192,11 @@
192
192
 
193
193
  try(Connection conn=DriverManager.getConnection(JDBC_URL,DB_USER,DB_PASS)){
194
194
 
195
- String sql="select * from account where user_id=? and pass=?";
195
+ //String sql="select * from account where user_id=? and pass=?";
196
+
197
+ String sql="select trim(user_id)as user_id,rtrim(pass) as pass,rtrim(mail) as mail,rtrim(name) as name,age from account where user_id=? and pass=?";
198
+
199
+
196
200
 
197
201
  PreparedStatement pStmt=conn.prepareStatement(sql);
198
202