I need to filter a schedule by dates, in this courses will be registered throughout the year but I need to show only those of the month
$fecha_filtro = date('Y/m/d');
if ($fecha_filtro == '05'){
$pg = "select * from cronograma where fecha ilike '%".$fecha_filtro."%'";
$query = pg_query($pg);
}
The 05 of the if is the month that I need to filter, as I have it does not work.