This topic is locked

Medical scheduling

4/15/2017 8:12:28 PM
PHPRunner General questions
brito author

Good evening!!!

I'm having a little difficulty in project scheduling, I'm not able to create the calendar by selecting the days of the week.
CREATE DEFINER=root@localhost PROCEDURE up_agenda(id_us int,id_profissional bigint,id_especialidade int,turno int,n_pacientes int,id_impedimento int, tipo_agenda int, startDate DATE, endDate DATE)

BEGIN

WHILE startDate < endDate DO

INSERT agenda_atendimento VALUES (id_agenda, id_us, id_profissional, id_especialidade, turno, n_pacientes, id_impedimento, tipo_agenda, startDate);
SET startDate = DATE_ADD(startDate, INTERVAL 1 DAY);

END WHILE;

END;