$result = DB::select()->from('users')->execute();
// returns an array with 'id' => 'email' pairs for every record in the resultset
$key_value_array = $result->as_array('id', 'email');
// now you can do something with $id or $email
foreach($key_value_array as $id => $email)
{
....
}
It looks like you're new here. If you want to get involved, click one of these buttons!