+ 1
IDK if this is outdated, but I did it this way years ago utilizing JDBC, no other time since import java.sql.* lib Have a Connection object, we'll call it connection Use PreparedStatement objects for each statement you want connection = DriverManager.getConnection(URL, USERNAME, PASSWORD); prepare your statements connection.prepareStatement("SELECT * FROM myDB"); Thats just the constructor. Adding data, or INSERT INTO x (a,b,c,d) VALUES (?,?,?,?) pps.setString(1, a); pps.setString(2, b); ... pps.executeUpdate(); IIRC, these require try-catch blocks
16th Mar 2018, 1:14 AM
怌ļ¼Øļ¼”ļ¼°ļ¼°ļ¼¹ ļ¼“ļ¼Æ ļ¼Øļ¼„ļ¼¬ļ¼°ć€
怌ļ¼Øļ¼”ļ¼°ļ¼°ļ¼¹ ļ¼“ļ¼Æ ļ¼Øļ¼„ļ¼¬ļ¼°ć€ - avatar