Modified update_record to use prepared statements. Added a unit test and a workaround for quoting ?s