Drupal 7: fetchField(0) giving me half of the records!
Yes, the loop iterates through result, but additionally you do that kind of again in your line $value = $result-&gt;fetchField(0);.

This should be changed to $value = $record-&gt;name;.