modified get_single_value_from_db to use $options dictionary