You have to move the clear
and send
methods into your while loop:
$email = "select si.email_address, sr.control_no
from sa_student si
left join sa_sase_result sr on sr.control_no = si.control_no
where schoolyear = '2013'
";
if ($p_address=mysql_query($email))
{
while($row = mysql_fetch_array($p_address))
{
$mail->AddAddress($row['email_address']);
$mail->AddAttachment("fpdf/pdf_reports/docu/".$row['control_no'].".pdf");
$mail->Send();
$mail->ClearAllRecipients();
$mail->ClearAttachments();
}
}