0
You are giving the error Warning: mysqli_num_rows() expects Parameter 1 to be mysqli_result, Boolean Given in. Can anyone help me?
$mes = date('m');
$ano = date('Y');
$sql = mysqli_query($conn, "SELECT * FROM table WHERE empresa='empresa' AND MONTH(data_atendimento) = '$mes' AND YEAR(data_atendimento) = '$ano'");
$numRegistros = mysqli_num_rows($sql);
Hello, I believe the error is in the query possibly in one of the parameters after Where tries to remove these parameters and run the query again to see if it will run normally and if you add some parameter in Where and the error occurs can identify which one is wrong inserted.
– Thales Morais