|
ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and T2.IsIndoor = 0 and
TA2.TeamID = T2.TeamID and DisplayOnFrontPag' at line 4
select
1, TA.*,
(select count(*) from TeamAnnual TA2, Teams T2
where TA2.SeasonID = and T2.IsIndoor = 0 and
TA2.TeamID = T2.TeamID and DisplayOnFrontPage = 1) Sponsors, T.TeamName
from
TeamAnnual TA, Teams T
where
T.TeamID = TA.TeamID and
TA.SeasonID = and T.IsIndoor = 0 and DisplayOnFrontPage = 1
union all
select
2, TA.*, 1, T.TeamName
from
TeamAnnual TA, Teams T
where
T.TeamID = TA.TeamID and
TA.SeasonID = and T.IsIndoor = 0 and DisplayOnFrontPage = 1
order by 1,2
|