filter_between
filter_between
filter_between(string $table, string $column, mixed $first_param, mixed $second_param, $parameters_type = Constants::SRE_NUMBER)
Parameter | Description |
---|---|
$table | The table which contains the filter by column. |
$column | The filter by column (The column by which you want to filter the report ) |
$first_param | The lower limit of the range. it can be a number or date. |
$second_param | The upper limit of the range. It can be a number or a date. |
$parameters_type | The data type of the filter parameters. It can be SRE_NUMBER or SRE_TEXT. If omitted, SRE_NUMBER will be used. |
$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();