closes #487 Use db->getf() instead of creating a cursor. Simpler, more
efficient.