PHP based database interaction class.