I have a script that needs to insert multiple things inside one statement, like
sql = "INSERT INTO `table` (something, something) VALUES (smth,smth); INSERT INTO `table` (something, something) VALUES (smth,smth)";
Statement stmt = connection_db.createStatement();
boolean update = stmt.execute(sql);
the long sql is concatenated based on conditions and needs to be this long. Using this kind of an sql statement in phpmyadmin is valid and inserts it no problem, however JAVA spits out an error.
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INSERT INTO `
Is there something I could do to insert this kind of sql, or should I remake my code to launch several times to achieve the same result?