Jump to content

Question


shage

Recommended Posts

		{
	case "delimit":
		foreach($addresses_delimit as $address)
		{
			$query = "SELECT * from ".MYSQL_TBL_MAILLIST_SUBSCRIBERS." WHERE address = '$address' && list_id='$_GET[list_id]'";
			$result = mysql_query($query) or die("Query failed : " . mysql_error());
			$num_rows = mysql_num_rows($result);
			if ($num_rows == 0 And validate_email($address) And !blacklist($address))
			{
				$key = md5(time());
				$req_time = time();
				$insert_query = "INSERT INTO ".MYSQL_TBL_MAILLIST_SUBSCRIBERS." (list_id,address,userkey,confirmed,last_sub_req_date,bounce_count)VALUES ('$_GET[list_id]', '$address', '$key', '1', '$req_time', '0')";
				$insert_result = mysql_query($insert_query) or die("Query failed : " . mysql_error());
				$good_addresses[] = $address;
			}
			else
			{
				$bad_addresses[] = $address;
			}
		}

 

How would i go about having it check another db also to see if $address is in there, if $address is not in there then add information to db

 

what it is is unsubcribe db for my forum so i dont readd them on import, so i figured on unsubscribe will add their email into another table, if import sees email in unsubscribe table then dont add, if not then check to see if in db if not then add if already in there then dont add, i hope i said that right

Link to comment
Share on other sites

well what would be the point of deleting it if import would add it again, im trying to make it so when i import that i dont add the same be that unsubcribed in the past, im trying to be good to my forum members

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.