Changed update_record to use prepared statements.