Added view pagination
Example now working with SQL