remove a bug when connection dose not automatically commit
prevent sql injection with prepared statments