Re:A guide to preventing SQL injection
by umjames on Tuesday September 15, 2009 @03:53PM
(#824596)
Hate to sound pedantic, but the Java example is a little off. java.sql.PreparedStatements have their parameters start at index 1, not 0. So the first "?" is parameter 1 and the second is parameter 2.
It's one of the few places in Java where indexing starts at 1 instead of 0.
It's one of the few places in Java where indexing starts at 1 instead of 0.