An error occurred while trying to run your query.
Error message: DB Error: unknown error
A more detailed error description: select dp.year, team,
(select if((captain1id=id AND winner=1) OR (captain2id=id AND winner=2), 'Won', 'Lost') from history, golfers where lastname=dp.team AND history.year=dp.year) as result,
(select count(*) from matches where year=dp.year AND ( ((team1a=14 or team1b=14) and winner=1) OR ((team2a=14 or team2b=14) and winner=2) ) ) as wins,
(select count(*) from matches where year=dp.year AND ( ((team1a=14 or team1b=14) and winner=2) OR ((team2a=14 or team2b=14) and winner=1) ) ) as losses,
(select count(*) from matches where year=dp.year AND ( ((team1a=14 or team1b=14) and winner=0) OR ((team2a=14 or team2b=14) and winner=0) ) ) as ties
FROM draftPicks dp
JOIN history h ON h.year=dp.year
WHERE golferid=14 order by h.year desc; [nativecode=1242 ** Subquery returns more than 1 row]