Displaying 1 result from an estimated 1 matches for "destination_name".
2006 Jul 15
3
How bad is it to have 7 joins in my find_by_sql?
...def atom
items_per_feed = 15
sql_query = "SELECT activities.*, users.real_name AS real_name,
accounts.last_scraped_at AS last_scraped_at,
accounts.total_miles as account_miles,
origins.name AS origin_name, origins.code AS origin_code,
destinations.name
AS destination_name, destinations.code AS destination_code,
airlines.name
AS airline_name, airlines.code AS airline_code, programs.name
AS program_name,
membership_levels.name AS membership_level FROM activities
LEFT OUTER JOIN accounts ON activities.account_id = accounts.id
LEFT OUTER JOIN...