filter_between

 
          filter_between(string $table, string $column, mixed $first_param, mixed $second_param, $parameters_type = Constants::SRE_NUMBER)  
This is one of the many filters supported in the Smart Report Engine to filter your report by the data of any column in it. And, you can combine many filters in the same report. This method filters any specific column between two numbers or two dates.
# This method is available in both the community edition and the commercial edition .

# Note

1- The column you are using for any of the filters methods must be a selected column in your report.
2- In case of native projects, constants should be passed directory (i.e SRE_NUMBER), but in case of Laravel project constants should be passed as static members of the constants class (i.e Constants::SRE_NUMBER)

# Parameters

Parameter Description
$tableThe table which contains the filter by column.
$columnThe filter by column (The column by which you want to filter the report )
$first_paramThe lower limit of the range. it can be a number or date.
$second_paramThe upper limit of the range. It can be a number or a date.
$parameters_typeThe data type of the filter parameters. It can be SRE_NUMBER or SRE_TEXT. If omitted, SRE_NUMBER will be used.

# Returns

This method returns the calling object, so it can be chained with other methods in the ‘ReportOptions’ class

# Code Example

 
           $report->select_tables(array("items"))
       ->select_fields(array("id", "country", "date", "units_in_stock","product_name"))
       ->filter_like("items", "country", "usa")
       ->filter_between("items", "units_in_stock", 0, 15,SRE_NUMBER)
       ->filter_more("items", "date", "2018-01-01",SRE_TEXT);
$engine = new CustomEngine($report);
$report_path = $engine->create_report();