You are here

protected function StatsPro::get_min_max_period in Statistics Pro 6.2

Same name and namespace in other branches
  1. 6 statspro.inc \statspro::get_min_max_period()

Returns a string with a WHERE compliant representation of a min and max day selection.

Parameters

<string> $field:

<int> $min:

<int> $max:

Return value

<string> SQL min and max WHERE.

3 calls to StatsPro::get_min_max_period()
StatsPro::get_month_from_reference in ./statspro.inc
Returns a SQL WHERE for the selected month.
StatsPro::get_period in ./statspro.inc
Generate SQL fragment for period query.
StatsPro::get_week_from_reference in ./statspro.inc
Returns a SQL WHERE for the selected week.

File

./statspro.inc, line 240
statspro class for Statistics Pro module.

Class

StatsPro
Manages the data saving and retrieval according to the user defined parameters.

Code

protected function get_min_max_period($field, $min, $max) {
  return sprintf('(%s >= %d AND %1$s <= %d)', $field, $min, $max);
}