30 lines
919 B
Plaintext
30 lines
919 B
Plaintext
|
|
|
||
|
|
select
|
||
|
|
|
||
|
|
curso.nombre as cname,
|
||
|
|
concat(lugar.municipio,', ',lugar.federativa) as place,
|
||
|
|
|
||
|
|
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,
|
||
|
|
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
|
||
|
|
|
||
|
|
|
||
|
|
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 = ?
|