mySQL error: 1054
Unknown column 'c.location_id' in 'on clause'
Query: SELECT c.*, u.user_name, e.edit_id, e.edit_user_id, (SELECT user_name AS user_name2 FROM users, edit_log WHERE user_id = edit_user_id AND edit_table_name = 'chapters' AND edit_view = 1 ORDER BY edit_date DESC LIMIT 1) AS user_name2 FROM locations c, users u LEFT JOIN edit_log e ON e.edit_table_name = 'locations' AND e.edit_data_1 = c.location_id AND e.edit_view = 1 WHERE u.user_id = c.location_user_id AND c.location_checked = 1 GROUP BY c.location_id ORDER BY c.location_order, e.edit_date DESC