Created
November 5, 2017 22:07
-
-
Save dusanstanojeviccs/70116e3703716bac0545f7ad0fd938ce to your computer and use it in GitHub Desktop.
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 update(Book book) throws SQLException { | |
PreparedStatement preparedStatement = database.getConnection().prepareStatement("update books set title = ?, description = ? where id = ?"); | |
preparedStatement.setString(1, book.getTitle()); | |
preparedStatement.setString(2, book.getDescription()); | |
preparedStatement.setInt(3, book.getId()); | |
preparedStatement.executeUpdate(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment