Returning a db query for select options in webform
If you're creating a select list then you only need two fields from the database, so you can use the excellent fetchAllKeyed() method of the database query. This will let you get your results in a single line of code:

function _MY_MODULE_get_rate_options() {
  return db_query('SELECT id, name FROM {my_table}')-&gt;fetchAllKeyed();
}


The result is an array keyed by the first field (id) with values from the second field (name).