This commit is contained in:
sjm committed 2023-07-07 12:31:06 +08:00
1 parent 095d3bc4b3
commit 0f053f6613
2 files changed
+2 -3

No files matched your search

+1 -1
View File
@@ -314,7 +314,7 @@ public class UserDao {
public void insertUserAvatar(String username,String url){
Connection conn = null;
PreparedStatement preparedStatement = null;
String sql = "insert into user set userAvatar = ? where userName = ? AND isValid = 1;";
String sql = "UPDATE user set userAvatar = ''+?+'' WHERE userName = ? AND isValid = 1;";
try{
conn = JdbcUtils.getConnection();
preparedStatement = conn.prepareStatement(sql);
@@ -66,5 +66,4 @@ public class userAvatarServlet extends HttpServlet {
setResult(200, msg, writer);
}
}
}
}