Use while in db->makeArray()