Colleagues,
I have a table where it has the datetime () field of Mysql. I would like to get a particular month directly from the where clause. By PHP I know how to do it, but how would I do it directly through the query? I tried this way to get the records for May, but it did not work:
$mês = $_POST["MesBusca"]; // Vamos supor que seja mês de maio (05)
SELECT * FROM tabela WHERE MONTH(DataAbertura) = MONTH(".$mes."); // Tentei também com o 5