3 ms·
I wasn't familiar with parameterized sql, but am looking closer now. Initial searches are not providing much as a guide. Anybody have any good links to resource
by pedalpete 18y ago
I wasn't familiar with parameterized sql, but am looking closer now. Initial searches are not providing much as a guide. Anybody have any good links to resources?
The best I found was
http://www.codinghorror.com/blog/archives/000275.html http://www.codinghorror.com/blog/archives/000275.html
but I'm hoping to get something that better describes what I should be doing with parameterized sql.
Thanks
- axod 18y agoQuick 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.