diff --git a/htdocs/adherents/subscription/list.php b/htdocs/adherents/subscription/list.php index 21ba01088e4d2..c8f7bce5f9508 100644 --- a/htdocs/adherents/subscription/list.php +++ b/htdocs/adherents/subscription/list.php @@ -40,7 +40,7 @@ $search_amount=GETPOST('search_amount','alpha'); $optioncss = GETPOST('optioncss','alpha'); -$date_select=isset($_GET["date_select"])?$_GET["date_select"]:$_POST["date_select"]; +$date_select=GETPOST("date_select",'alpha'); $limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit; $sortfield = GETPOST("sortfield",'alpha'); @@ -126,7 +126,8 @@ $sql.= " AND d.entity IN (".getEntity('adherent').")"; if (isset($date_select) && $date_select != '') { - $sql.= " AND c.dateadh LIKE '".$date_select."%'"; + $sql.= " AND c.dateadh >= '".$date_select."-01-01 00:00:00'"; + $sql.= " AND c.dateadh < '".($date_select+1)."-01-01 00:00:00'"; } if ($search_ref) {