I have been trying this for a couple of hours now but i cant get it to work: Getting the Invalid amount of parameter error.
Here is what i have so far:
Code:
SELECT administrator_adm.email_adm,administrator_adm.fname_adm,
administrator_adm.lname_adm, administrator_adm.level_adm,
administrator_adm.archive_adm, staff_stf.isemployed_stf
FROM (administrator_adm LEFT JOIN staff_stf ON
staff_stf.idadm_stf=administrator_adm.id_adm)
WHERE administrator_adm.level_adm='teacher'
AND administrator_adm.archive_adm is null AND
staff_stf.isemployed_stf=1 ";
$res_group = mysql_query($sel_group) or
die("the sel_group query complained: ".mysql_error());
$row_group = mysql_fetch_assoc($res_group);
$show = implode(",", $row_group['email']);
The query work over all its just the implode. I want to take all the email address from the query and convert them to a comma seperated string so i can pass them to a $to vatiable to send email to multiple addresses. I could have just looped the whole send email block but i consider this less efficient. Any ideas what i am doing wrong here