Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Parse Pagination Using Unofficial PHP Parse SDK from: https://github.com/apotropaic/parse.com-php-library
<?php
// using https://github.com/apotropaic/parse.com-php-library PHP Parse Library
require_once( 'Parse/parse.php' );
$query = new parseQuery('TestClass');
// hack to get all results
$query->whereNotEqualTo( 'name', 'foo' );
// pickup offset from URL
if ( isset( $_GET['p'] ) && is_numeric( $_GET['p'] ) ) {
$query->setSkip( $_GET['p'] );
}
// default result limit
$query->setLimit( 10 );
$results = $query->find();
// display results
print_r( $results );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment