Is the problem with the query below in the SELECT?? Should I be using
PHP to do some of things I am trying to get the SELECT to do?
What is happening is it opens 3 or 4 of the same query/process and each
of the process status' stay at 'Copying to tmp table', and pretty much
bring down the server.
Thanks!
SELECT IF(se.regtype = 'i',CONCAT(p.ln ame,',
',p.fname),t.te amname),p.city, CONCAT(IF(se.re gtype='i','Indi vidual','Team') ,IF(se.subevent ID[color=blue]
>= 9 AND se.subeventID <= 13,CONCAT(' - ',categoryname, '<BR[/color]
/>'),IF(se.subev entID = 1 OR se.subeventID = 2,'','<BR
/>')),IF(se.sube ventID = 4,CONCAT('<B>Su per
',st.subregtype name,'</B>'),IF(se.sube ventID = 1 OR se.subeventID = 2 OR
se.subeventID =
20,'',CONCAT('< B>',st.subregty pename,'</B>')))),p.displ ayname FROM
(((((((particip ant2006_copy as p
LEFT OUTER JOIN captain2006_cop y as c ON
p.participantID =c.relparticipa ntID)
LEFT OUTER JOIN team2006_copy as t ON t.relcaptainID= c.captainID)
LEFT OUTER JOIN registration200 6_copy as r ON
p.participantID =r.relparticipa ntID)
LEFT OUTER JOIN regdsubevt2006_ copy as rs ON
rs.relregistrat ionID=r.registr ationID)
LEFT OUTER JOIN subevent2006_co py as se ON
rs.relsubeventI D=se.subeventID )
LEFT OUTER JOIN category2006_co py as ct ON
se.subeventID=c t.relsubeventID )
LEFT OUTER JOIN subregtype as st ON se.relsubregtyp eID=st.subregty peID)
WHERE rs.relsubeventI D IN ($subevtimplode )
ORDER BY p.lname,p.fname ,t.teamname ASC
PHP to do some of things I am trying to get the SELECT to do?
What is happening is it opens 3 or 4 of the same query/process and each
of the process status' stay at 'Copying to tmp table', and pretty much
bring down the server.
Thanks!
SELECT IF(se.regtype = 'i',CONCAT(p.ln ame,',
',p.fname),t.te amname),p.city, CONCAT(IF(se.re gtype='i','Indi vidual','Team') ,IF(se.subevent ID[color=blue]
>= 9 AND se.subeventID <= 13,CONCAT(' - ',categoryname, '<BR[/color]
/>'),IF(se.subev entID = 1 OR se.subeventID = 2,'','<BR
/>')),IF(se.sube ventID = 4,CONCAT('<B>Su per
',st.subregtype name,'</B>'),IF(se.sube ventID = 1 OR se.subeventID = 2 OR
se.subeventID =
20,'',CONCAT('< B>',st.subregty pename,'</B>')))),p.displ ayname FROM
(((((((particip ant2006_copy as p
LEFT OUTER JOIN captain2006_cop y as c ON
p.participantID =c.relparticipa ntID)
LEFT OUTER JOIN team2006_copy as t ON t.relcaptainID= c.captainID)
LEFT OUTER JOIN registration200 6_copy as r ON
p.participantID =r.relparticipa ntID)
LEFT OUTER JOIN regdsubevt2006_ copy as rs ON
rs.relregistrat ionID=r.registr ationID)
LEFT OUTER JOIN subevent2006_co py as se ON
rs.relsubeventI D=se.subeventID )
LEFT OUTER JOIN category2006_co py as ct ON
se.subeventID=c t.relsubeventID )
LEFT OUTER JOIN subregtype as st ON se.relsubregtyp eID=st.subregty peID)
WHERE rs.relsubeventI D IN ($subevtimplode )
ORDER BY p.lname,p.fname ,t.teamname ASC
Comment