I want to be able to find all the records with value 1 in attendance that are between 2 dates for a user:
SELECT * FROM asistencia
WHERE id='124' AND asistencia = '1' AND fecha BETWEEN '2018-07-30' AND '2018-08-12'
And as an additional filter if in this case $fecha_de_ingreso='2018-08-08';
shows me the 4 corresponding records, SI $fecha_de_ingreso
is not between the two dates, that does not show me anything.