News for hackers. Stuff that matters.
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.

Re:A guide to preventing SQL injection by tetha on Tuesday September 15, 2009 @07:24PM (#824977)
... which probably is the reason he got it wrong. Consistency is a blessing.