Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Connection conn = DriverManager.getConnection("jdbc:mysql://localhost/tournament_system?"
- + "user=root&password=root");
- java.sql.PreparedStatement ps = conn
- .prepareStatement(" insert into PLAYER (ID, NAME, SURNAME, CLUB, WORLD_RANKING, USER_ID) VALUES(?, ?, ?, ?, ?, ?)");
- ps.setInt(1, 100001);
- ps.setString(2, "ěščřž");
- ps.setString(3, "xxx");
- ps.setString(4, null);
- ps.setInt(5, 5);
- ps.setInt(6, 1);
- ps.executeUpdate();
- INSERT INTO `tournament_system`.`PLAYER` (`ID`, `NAME`, `SURNAME`, `CLUB`, `PLAYER_DISCRIMINATOR`, `WORLD_RANKING`, `USER_ID`) VALUES ('10002', 'ěščřž', 'qqq', NULL, 'qqq', NULL, '1');
- Server: Localhost via UNIX socket
- Server version: 5.5.34-0ubuntu0.12.10.1
- Protocol version: 10
- User: root@localhost
- MySQL charset: UTF-8 Unicode (utf8)
- Connection conn = DriverManager.getConnection("jdbc:mysql://localhost/tournament_system?"
- + "user=root&password=root&characterEncoding=UTF-8");
Add Comment
Please, Sign In to add comment