I tried that but it did not work. I was playing around by referencing another table that stores enrolled users and that worked.
$enSQL = mysql_query("SELECT * FROM ".$prefix."_enrollment WHERE testID=$testID AND aID=".$a["aID"]." ",$dblink)
or die(mysql_error());
if (mysql_numrows($enSQL)) {
while ($temp = mysql_fetch_array($sql)) {
$str = addslashes($question);
$uSQL = mysql_query("UPDATE ".$a["aID"]."_".$testID." SET attachmentType='$attachmentType', attachment='$attachment', question='$str', answer='$answer' WHERE buildID=$id",$dblink)
or die(mysql_error());
}
}
Thanks for the feedback, maybe this will help others.