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
https://forums.phpfreaks.com/topic/58096-question/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.