Hi,

I've the following query :

SELECT IFNULL(SUM(gate_receipts),0) AS gate_receipts, competitions.caption
FROM fixtures_results
INNER JOIN competitions ON fixtures_results.competitions_id =
competitions.competitions_id
WHERE home_teams_id = 27
AND worlds_id = 1 AND status = 'approved'

However, I want to check the value of competitions.competition_type and if
it is 'cup' I want to divide the value of gate_receipts by 2.  How is the
best way to achieve this ?

Regards
Neil

Reply via email to