Created
April 1, 2015 09:13
-
-
Save nunenuh/f95c6535a62fd550f00b to your computer and use it in GitHub Desktop.
Sample Insert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void insert(Mahasiswa mhs){ | |
String sql = "INSERT INTO mahasiswa (NIM, NAMA) VALUES(?,?)"; | |
MySQLQuery query = new MySQLQuery(); | |
PreparedStatement st = query.prepareQuery(sql); | |
st.setString(1, mhs.getNIM()); | |
st.setString(2, mhs.getNAMA()); | |
st.executeUpdate(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment