Author Topic: List Purge / Permission Pass  (Read 4807 times)

mike2

  • Posts: 193
    • View Profile
List Purge / Permission Pass
« on: April 30, 2008, 08:36:31 am »
I'm getting ready to move to a new server and want to make sure my list is squeaky clean.

I want to do a list purge / permission pass...   Here's what I want to do:

I want to email everyone letting them know I will be doing a list purge of everyone who hasn't clicked a link from my mailings in the past 6-12 months or so and provide a LM Tracking link for them to click.

I then want to later purge ( actually move to a new list ) all the folks on list 1 who haven't clicked any of my tracking links that I have in LM.

So basically:  Any user on List 1 who has not clicked on any of my tracking links needs moved to say list 26 or whatever list.  They should keep all of their info including IP, Ref URL, and status ( active, bounced ) etc, etc.

Dean,  I know this would take a special page and a bit of coding, could you help me with it?  I'd be happy to pay a small fee for doing this.  Please let me know asap as I need to move on this today!

mike2

  • Posts: 193
    • View Profile
List Purge / Permission Pass
« Reply #1 on: May 01, 2008, 06:57:50 am »
Dean or anyone else with php/mysql expertise want to help me with this?

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
List Purge / Permission Pass
« Reply #2 on: May 03, 2008, 06:23:37 pm »
Hi Mike,

Copy the following code to a PHP file and browse to it:
Code: [Select]
<?php//  place this script in your ListMail folder and browse to itinclude('./config.php');include('./admin.php');$from_list = '1';$to_list = '2';$demo = true; // set to false to run live// loop all users on from list$rows=mysql_query("select id,email from lm_users where list = '$from_list';");while(list($id,$em)=mysql_fetch_row($rows)){ // check if user id exists in hits table list($id2)=@mysql_fetch_row(mysql_query("select uid  from lm_hits where uid = '$id';")); if($id2){  // exists, move to list   if($demo){   echo "User $em found in hits and would be moved<br>";  } else {   // update user   mysql_query("update lm_users set list = '$to_list' where id = '$id';") or die(mysql_error());   echo "User $em moved from list $from_list to $to_list<br>";   } }}?>

Please let me know if you have any questions or troubles with the script.

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting