I've never had to do a large query involving multiple tables before but I had originally thought the below would work, but unfortunately it doesn't:
Code: Select all
SELECT * FROM community_events, knowledge_base, press_releases
WHERE status = 'active' and spotlight = 'on'
ORDER BY 'date_full' DESC"#1052 - Column: 'STATUS' in where clause is ambiguous".
Obviously this is because the status (and spotlight) column is in each table. How do I get around this? I'd like someone to aid me in writing the query, but also some explanation of what the query does would be helpful in helping me learn a bit more about this.