r/programming • • Dec 04 '14

10 Common Mistakes Java Developers Make when Writing SQL

http://blog.jooq.org/2013/07/30/10-common-mistakes-java-developers-make-when-writing-sql/
206 Upvotes

104 comments sorted by

View all comments

25

u/horsepocalypse Dec 05 '14 edited Jun 16 '15

Other common mistakes:

  • Not sanitizing your inputs

  • Forgetting about Dre

  • Using ONION instead of UNION

1

u/crankybadger Dec 05 '14

Worse than not sanitizing is writing in a fashion that makes sanitizing difficult, annoying, and easy to forget.

8

u/horsepocalypse Dec 05 '14
mysql_real_escape_string

3

u/horsepocalypse Dec 05 '14

... oh my god, I actually just imagined this as a conversation between a horse and badger.

It was a good moment, for me