MySQL Forums
Forum List  »  Spanish

Re: Consulta para calendario de citas
Posted by: roberto carlos
Date: April 17, 2013 02:29PM

Te adjunto los datos de la tabla.
Si quiero saber que citas hay para el día 16 de Abril de 2013, tienen que aparecer
2 citas, una de la cita de dias seguidos y otra de la cita de los martes recurrente.
No se como orientar la consulta a la base de datos para que muestre correctamente las citas de un día como es este caso.
Aaahhhh en repetir, el valor 0 es igual a no y 1 es igual a si.
Saludos y gracias por vuestra ayuda.

Estos son los datos de la tabla:
CREATE TABLE `anotaciones` (
`id_mov` int(10) NOT NULL AUTO_INCREMENT,
`titulo` varchar(40) CHARACTER SET latin1 COLLATE latin1_spanish_ci NOT NULL,
`fecha_ini` date NOT NULL,
`fecha_fin` date NOT NULL,
`hora_ini` time NOT NULL,
`hora_fin` time NOT NULL,
`repetir` int(1) DEFAULT NULL,
`cada_cuanto` int(3) DEFAULT NULL,
PRIMARY KEY (`id_mov`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;

--
-- Volcado de datos para la tabla `anotaciones`
--

INSERT INTO `anotaciones` (`id_mov`, `titulo`, `fecha_ini`, `fecha_fin`, `hora_ini`, `hora_fin`, `repetir`, `cada_cuanto`) VALUES
(1, 'Cita normal para prueba', '2013-04-05', '2013-04-05', '09:00:00', '10:30:00', NULL, NULL),
(2, 'Prueba de cita de cuatro días seguidos', '2013-04-15', '2013-04-18', '09:00:00', '12:00:00', NULL, NULL),
(3, 'Prueba de cita recurrente (cada martes h', '2013-04-02', '2013-05-28', '09:00:00', '10:00:00', 1, 7);

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Consulta para calendario de citas
1785
April 17, 2013 02:29PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.