hola, estoy tratando de crear una funcion para validar el ingreso de unas fechas (date), por lo que hice lo siguiente:
Código MySQL:
Ver originaldelimiter //
insert into evento
(detalle
,fecha_inicio
,fecha_termino
,lugar
,tipo_trabajo
,imagen
) values(detalle1
,fecha_inicio1
,fecha_termino1
,lugar1
,tipo_trabajo1
,imagen1
); return salida;
//
Sin embargo, me arroja el siguiente error:
Error Code : 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'if fecha_inicio1>=curdate() and fecha_inicio1<fecha_termino1 then
set salida = 1' at line 1
(15 ms taken)
Alguien sabe a que se debe el error ?