Parameterized Queries

Updated some of the queries in db_type_handle and db_user_handle to use parameterized queries instead of concatenation. This should be more secure against sql injection.