Fix a sneaky bug in dbquery() and add a todo item.