Hi all,
This is my first post on this forum, I hope someone here can help because the last few forums were at a loss...
Any ways, I have this MYSQL command:
SELECT DISTINCT schedule_date, schedule_time, schedule_team_1, schedule_team_2, event_name, type_name, gen_duration,
COUNT(DISTINCT((SELECT id FROM link_schedules WHERE schedule_id = schedules.schedule_id UNION SELECT id FROM
link_events WHERE event_id = events.event_id))) as Count
FROM schedules
LEFT JOIN events ON schedules.event_id = events.event_id
LEFT JOIN type ON schedules.type_id = ea_type.type_id
WHERE schedules.schedule_date >= '2011-01-25'
GROUP BY schedules.schedule_id
ORDER BY schedules.schedule_date ASC,
schedules.schedule_time ASC
LIMIT 20
When I run this script I get the error message:
Subquery returns more than 1 row