The easiest way to prevent SQL injection

Well you can prevent people from being able to update or insert in the database, don't give the user all access for your crappy code. You could put the users...