4 ms·
Quick example in java: PreparedStatement stmt = conn.prepareStatement("UPDATE accounts set username=?, password=? where id=?"); stmt.setString(1, "foo"); stm
by axod 18y ago
Quick example in java:
PreparedStatement stmt = conn.prepareStatement("UPDATE accounts set username=?, password=? where id=?");
stmt.setString(1, "foo");
stmt.setString(2, "bar");
stmt.setInt(3, 49);
stmt.executeUpdate();
As you see, very easy to do, and separates SQL from data.