Perform a between limits match (usually: search for a value between
two numbers or a date between two preset dates). When $include is true
the condition tested is:
$from <= VALUE <= $to
When $include is false the condition tested is:
$from < VALUE < $to