Fix filtro per data
This commit is contained in:
parent
c6cbf04775
commit
d8f408fba0
|
@ -214,8 +214,10 @@ class Query
|
||||||
$value = trim(str_replace(['<', '>'], '', $value));
|
$value = trim(str_replace(['<', '>'], '', $value));
|
||||||
|
|
||||||
if ($more || $minus) {
|
if ($more || $minus) {
|
||||||
if( date("Y-d-m",strtotime($value))!='1970-01-01' ){
|
list($giorno, $mese, $anno)=explode('/', $value);
|
||||||
$search_filters[] = $search_query.' '.$sign.' \''.date("Y-d-m",strtotime($value)).'\'';
|
$data="'".$anno."-".$mese."-".$giorno."'";
|
||||||
|
if( $data!="'1970-01-01'" ){
|
||||||
|
$search_filters[] = $search_query.' '.$sign.' '.$data.'';
|
||||||
}else{
|
}else{
|
||||||
$search_filters[] = 'CAST('.$search_query.' AS UNSIGNED) '.$sign.' '.prepare($value);
|
$search_filters[] = 'CAST('.$search_query.' AS UNSIGNED) '.$sign.' '.prepare($value);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue