select c.nombre as cnombre, c.subnombre as csubnobre, t.mmail as mmail, t.fecha_inicio, t.fecha_fin, t.precio as cantidad from curso_tienda as t inner join curso as c on c.id = t.curso_id where t.id = ? and t.estado =1 ;