I\'ve connected to a MySQL database, which contains four fields (the first of which being an ID, the latter ones each containing varchar strings).
I am trying to get the
This should work, I think...
ResultSet results = st.executeQuery(sql); if(results.next()) { //there is a row int id = results.getInt(1); //ID if its 1st column String str1 = results.getString(2); ... }