This commit is contained in:
mynah
2020-01-15 23:42:58 -06:00
parent 567e991278
commit 252ec865b3
33 changed files with 1556 additions and 238 deletions

View File

@@ -1,4 +1,4 @@
select
curso.nombre as cname,
@@ -7,23 +7,20 @@ select
lugar.direccion as paddr,
lugar.observacion as pobs,
lugar.municipio as city,
evento.precio as cost,
case evento.promo_estado when 1 then coalesce(evento.promocion,"") else "" end as promo,
tienda_evento.precio as cost,
tienda_evento.spay as spay,
case tienda_evento.promo_estado when 1 then coalesce(tienda_evento.promocion,"") else "" end as promo,
curso.temario as csubjects,
curso.servicios as cservices,
lugar.nombre as pname,
case when month(evento.fecha_inicio) = month(evento.fecha_fin)
then concat("Del ", day(evento.fecha_inicio)," al ",day(evento.fecha_fin)," de ",mi.nombre)
else concat("Del ",day(evento.fecha_inicio)," de ",mi.nombre," al ",
day(evento.fecha_fin)," de ", mo.nombre)
end as date
day(tienda_evento.fecha_inicio) as dini,
day(tienda_evento.fecha_fin) as dend,
month(tienda_evento.fecha_inicio) as mini,
month(tienda_evento.fecha_fin) as mend
from evento
inner join lugar on evento.lugar_id=lugar.id
inner join curso on evento.curso_id=curso.id
join mes as mi on mi.id=month(evento.fecha_inicio)
join mes as mo on mo.id=month(evento.fecha_fin)
where evento.estado=1
and evento.id = ?
from tienda_evento
inner join lugar on tienda_evento.lugar_id=lugar.id
inner join curso on tienda_evento.curso_id=curso.id
where tienda_evento.estado=1
and tienda_evento.id = ?
;