Update PVDatabase.php

Fixing pagination and adding offset to select