0

I have a problem because when I try to insert data into my sql from minecraft plugin it does not insert but gives and error (Image) Image. I want to ID insert automaticly (I have Unique and Primary key set up in phpmyadmin) admin to be null or empty. reciever to be player (I can do it by myself) and priority to be set to 0 .

MyCode:

if(args[0].equals(args[0])) {
                StringBuilder message = new StringBuilder();
                for(int i = 0; i < args.length; i++) {
                    message.append(args[i]).append(" ");
                }
                
                try {
                    MySQL.ps("INSERT INTO `sawioreports`(id, admin, reciever, priority) VALUES ('', 'NULL', 'Sawio2001', '0');").executeUpdate();
                    p.sendMessage(ChatColor.translateAlternateColorCodes('&', "&cWyslano Report"));
                }catch(SQLException ev) {
                    ev.printStackTrace();
                }
    }
            return true;
}
Sawio2001
  • 1
  • 2

0 Answers0