Created
August 12, 2014 12:00
-
-
Save niraj-shah/6bf11dc34266b839b452 to your computer and use it in GitHub Desktop.
Parse Pagination Using Unofficial PHP Parse SDK from: https://github.com/apotropaic/parse.com-php-library
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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