I need to make a query with multiple data in SQL
, I have tried in the following way but I can't do it
$enero = "SELECT COUNT(*) total FROM avisos WHERE (fecha BETWEEN '$mes1' AND '$mes0';) AND parametro='5'";
I need to make a query with multiple data in SQL
, I have tried in the following way but I can't do it
$enero = "SELECT COUNT(*) total FROM avisos WHERE (fecha BETWEEN '$mes1' AND '$mes0';) AND parametro='5'";
I think if we change the order of your conditions a bit and remove the ; it should work. That is if you have defined your variables $ month1 and $month0 and they are dates with a valid format: