select date_format(tienda_evento.fecha_inicio,'%Y%m') as bid, tienda_evento.id as eeid, concat(lugar.municipio,", ",lugar.federativa) as ciudad, concat(lugar.nombre,". ") as lugar, lugar.direccion as dir, day(tienda_evento.fecha_inicio) as dini, day(tienda_evento.fecha_fin) as dfin, month(tienda_evento.fecha_inicio) as mini, month(tienda_evento.fecha_fin) as mfin, curso.nombre as nombre, tienda_evento.imagen_chica as imagen_chica 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.estore=1 order by tienda_evento.fecha_inicio ;