PHP code example of rherb / php-odata-query-builder
1. Go to this page and download the library: Download rherb/php-odata-query-builder library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
rherb / php-odata-query-builder example snippets
$builder = new ODataQueryBuilder('http://services.odata.org/V4/TripPinService/', 'People');
$builder->from('People')->top(10)->buildQuery();
$builder->from('People')->find('bobjoe')->buildQuery();
$builder->from('Books')->filter('Cost')->lessThan(20)->buildQuery();
$builder->from('People')->filter('LastName')->equals('Smith')->buildQuery();
$builder->from('People')->filter('LastName')->equals('Smith')->andFilter('FirstName')->equals('Joe')->buildQuery();
composer