Functions to load classids and prices from database.