I get this error in php when I want to make a query by date someone knows where the error is, I can not find it.
$consulta1+="year(cast(cast(fch as datetime)-1 as date))= " .$anio1 "and month(cast(cast(fch as datetime)-1 as date))= " .$chkBox.$condicion. ") as s";
I intend to pass the value of a year by means of a combobox and of the month by means of the value assigned to one or several checkboxes.