Various Filter examples
//Example 1
// URL to be called i.e. end point to access resource.
// e.g. Get all records of a database table name "orders".
//curl_setopt($ch, CURLOPT_URL, "http://pdocrud.com/RESTP/api/orders/");
//Example 2
//Get record with primary key value 44 from from database table name "orders".
//curl_setopt($ch, CURLOPT_URL, "http://pdocrud.com/RESTP/api/orders/44");
//Example 3
//Get record with column name "order_no" having value "50683" from database table name "orders".
//curl_setopt($ch, CURLOPT_URL, "http://pdocrud.com/RESTP/api/orders/order_no/50683");
//Example 4
//Sort or order records by column name "order_date"
//curl_setopt($ch, CURLOPT_URL, "http://pdocrud.com/RESTP/api/orders/?orderby=order_date");
//curl_setopt($ch, CURLOPT_URL, "http://pdocrud.com/RESTP/api/orders/?orderby[]=order_date&orderby[]=ID");
//curl_setopt($ch, CURLOPT_URL, "http://pdocrud.com/RESTP/api/orders/?orderby[]=order_date+desc");
//Example 5
//Search records - applying where condition
//curl_setopt($ch, CURLOPT_URL, "http://pdocrud.com/RESTP/api/orders/?where=order_no,2222");
//curl_setopt($ch, CURLOPT_URL, "http://pdocrud.com/RESTP/api/orders/?where=order_no,2222,eq");
//curl_setopt($ch, CURLOPT_URL, "http://pdocrud.com/RESTP/api/orders/?where[]=order_no,2222:76778,bt");
//curl_setopt($ch, CURLOPT_URL, "http://pdocrud.com/RESTP/api/orders/?where[]=order_no,2222,eq,and,(&where[]=order_no,76778,eq,or&where[]=order_no,2222,eq,,)");
//Example 6
//Group by columns
//curl_setopt($ch, CURLOPT_URL, "http://pdocrud.com/RESTP/api/orders/?groupby=order_status");
//Example 7
//Pagination - Apply Limit to no of records (offset, num of records)
//curl_setopt($ch, CURLOPT_URL, "http://pdocrud.com/RESTP/api/orders/?limit=0,10");
//Example 8
//Get selected columns of table.
//curl_setopt($ch, CURLOPT_URL, "http://pdocrud.com/RESTP/api/orders/?columns=ID,order_no");
//Example 9
//pass data array as GET parameter by encoding data as url format
//$data = array("where" => array('order_no,2222,"eq"'),
// "orderby" => array("order_amount asc", "order_status desc"),
// "groupby" => array("order_status"));
//$data = http_build_query($data);
//
//curl_setopt($ch, CURLOPT_URL, "http://pdocrud.com/RESTP/api/orders?".$data);