Hi,
I'm having this problem with my script, in the fact that it isn't deleting more than one email address. And if there aremore than one email address in the textarea then none get deleted. Here is my code:
I have a working copy of this, however it doesn't have the listID='$listID' part and it also doesn't use the emails but instead uses an ID. THat is for a different function so it wouldn't work with this.Code:if($ent == "") { errorMsg("You must enter at least one email address."); } else { $ents = explode("\n", $ent); if(count($ents) > 0) { $delidStr = implode(",",$ents); } $del = mysql_query("DELETE from emails WHERE listID='$listID' AND email in ('$delidStr')"); $num = mysql_affected_rows(); if($del) { msg("$num emails have been deleted."); } else { errorMsg("There was an error deleting the emails from the database."); print mysql_error(); } }
ANyway, does anyone know why this would only delete 1 email address, but is more than 1 is supplied it deletes none?
Thanx
Peter




Bookmarks