Do I need to create a new statement each time I execute a query?
This line doesn't work (I have already established connection with the database )
Statement.execute("INSERT INTO PS2 (uuid , team, kills , deaths , rank_lvl, rank_name, pts) "
+ "VALUES"
+ " (`" + name.toString() + "` , `none` , 0 , 0 , 1 , `Starter` , 0)");
I create the table with this code :
Statement.execute("CREATE TABLE IF NOT EXISTS PS2"
+ "(uuid VARCHAR(45),"
+ "team VARCHAR(20),"
+ "kills INTEGER,"
+ "deaths INTEGER,"
+ "rank_lvl INTEGER,"
+ "rank_name VARCHAR(25),"
+ "pts INTEGER)");
After executing the code , the database has been created . Afterwards after trying to insert row, the row is not created!
'reusablePreparedStatement.