private function parserMdFieldDatee($data) { $x = 0; $pos0 = 0; $pos0 = strpos($data, '_DATEE_', $pos0); $pos1 = strpos($data, "'", $pos0); $pos2 = strpos($data, "'", $pos1 + 2); $pom_date = substr($data, $pos1 + 1, $pos2 - ($pos1 + 1)); $pom_b = substr($data, 0, $pos1 + 1); $pom_e = substr($data, $pos2); $date = timeWindow($pom_date, '', ''); $data = $pom_b . $date[1] . $pom_e; $x++; $pos0 = $pos0 + 7; $data = str_replace('_DATEE_', 'md.range_begin', $data); $sql_date_e = "({$data})"; return $data; }
function getSearchRange($range_b, $range_e) { $rs = array(); if (strpos($range_b, '.')) { $range_b = dateCz2Iso($range_b); } if (strpos($range_e, '.')) { $range_e = dateCz2Iso($range_e); } $pom = timeWindow('', $range_b, $range_e); if ($pom[0] != '0000-00-00' && $pom[1] != '0000-00-00') { $rs[] = "_DATEB_ >= '{$pom['0']}'"; $rs[] = "AND"; $rs[] = "_DATEE_ <= '{$pom['1']}'"; } return $rs; }