Master Posted March 18, 2003 Share Posted March 18, 2003 SELECT day, month, year, winning_country.country_name winning_country, losing_country.country_name losing_country, matches.winning_score, matches.losing_score, location, crowd, worldcup, (matches.winning_score + matches.losing_score) as totalpoints FROM matches, countries winning_country, countries losing_country WHERE (matches.winning_country = winning_country.country_id) AND (matches.losing_country = losing_country.country_id) AND (totalpoints>50) When I run this query, I get an error saying column totalpoints does not exist. Why is that? Link to comment https://forums.phpfreaks.com/topic/236-error-message/ Share on other sites More sharing options...
pallevillesen Posted March 18, 2003 Share Posted March 18, 2003 Good question, try: SELECT day, month, year, winning_country.country_name winning_country, losing_country.country_name losing_country, matches.winning_score, matches.losing_score, location, crowd, worldcup, ((matches.winning_score + matches.losing_score) as totalpoints) FROM matches, countries winning_country, countries losing_country WHERE (matches.winning_country = winning_country.country_id) AND (matches.losing_country = losing_country.country_id) AND (totalpoints>50) If that doesn\'t work, then try putting (matches.winning_score + matches.losing_score) > 50 in the WHERE clause instead... P. Link to comment https://forums.phpfreaks.com/topic/236-error-message/#findComment-707 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.