PC-2011 Posted March 9, 2013 Posted March 9, 2013 ok so im creating a program that will run thro a set of a questions and send the results to my sql server. if have import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement; public class MySQL { public MySQL() { Connect(); } public static void Connect(){ try { Class.forName("com.mysql.jdbc.Driver"); Connection connection = DriverManager.getConnection( "jdbc:mysql://localhost:3306/test", "user1", "test"); Statement statement = connection.createStatement(); ResultSet resultSet = statement .executeQuery(""); while (resultSet.next()) { System.out.println("")); } } catch (Exception e) { e.printStackTrace(); } } } so i know im going to need to learn some sql but where would i put the command to send the array of answers with a user id and score. the array is a list of stings the id is a int and the score is a int if that helps Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.