Yes, you can almost always earn miles when flying on a partner airline, provided they belong to the same global alliance (such as Star Alliance, SkyTeam, or Oneworld). For example, if you are a member of United's MileagePlus program, you can earn United miles by flying on Lufthansa or Air Canada. To ensure you receive credit, you must enter your frequent flyer number at the time of booking or check-in. However, the rate of earning can vary significantly. Some discounted "economy" tickets on partner airlines may only earn 25% or 50% of the actual miles flown, or in some cases, no miles at all if the fare class is ineligible. It is also important to note that while you earn "award miles" for booking flights, you might earn fewer "status miles" (the ones that help you reach Silver, Gold, or Platinum) compared to flying on the airline's own planes. Always check the specific "partner earning table" on your airline's website before booking to maximize your rewards.