Author Topic: Extract Hits not creating new list???  (Read 6811 times)

BGSWebDesign

  • Posts: 625
    • View Profile
    • http://www.bgswebdesign.com
Extract Hits not creating new list???
« on: May 17, 2006, 07:32:56 am »
Hi DW,

I've been using your excellent ExtractHits.php script add-on to move my hits over to new lists, and copy/append them.  All was fine for many months, but now I have a problem.

The last list I'm trying to copy to a New list, (which is list #99), for some reason it says copied to new list 99, but there is NO new list 99?   Could it be that this used to be a list number that was deleted previously, and now it will not show up?  

Is there something I can do to see List #99?  Is there some limit in LMP that only goes to 99 (or 98) lists?  One thing, I deleted several lists that I used to have, so I really don't have 99 lists, it's more like I have about 20-30, so - if there is some way to recover those OLD list numbers, or get them re-set that might do it?  

Or, is there some other problem with ExtractHits?  I don't think so as it shows all the records extracted - like it usually does, it just seems that List #99 is invisible?

Ok, just had a look and there ARE records in the lm_users table with list=99, in fact:
Code: [Select]

Showing rows 0 - 29 (367 total, Query took 0.0092 sec)


Unfortunately when I didn't think it was working I also did a 'Move' when I didn't want to, now is there any way to COPY those users back to their respective lists - this is really a mess...

Any ideas?
Thanks,
-Brett
http://www.bgswebdesign.com/Contact-Us.php

*** I do custom List Mail Pro installations ***
Contact me through my website (above)

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Extract Hits not creating new list???
« Reply #1 on: May 17, 2006, 09:22:26 am »
The MySQL limitation on the "List #" is 65535 and currently there is no checking in ListMail other than making sure it is above 0 and does not already exist.

I think the INSERT statement into lm_lists failed, probably due to upgrading ListMail as a field was added to the table in recent versions.

From the bottom of upgrade.php (the last update):
Code: [Select]
mysql_query("ALTER TABLE $ltable ADD addopts VARCHAR(100) NOT NULL;")
Therefore, your list insert statement would be...

FROM
Code: [Select]
  $cmd2 = "insert into $ltable values('null','$nlnum','".addslashes($refcode)."','news@$dom','New List Newsletter','errors@yoursite.com','Welcome!','Welcome to the mailing list!','','','1','Please verify your subscription','Click the link below to verify your email address for subscription to the yoursite.com newsletter\n\n!confirm','','','0','','', '','','','','','','','','','','0;0;0;0;0','$adminmail','0;0')";
Now we simply add another blank field to the end of the MySQL values() with the addition of the following:
Code: [Select]
,''
TO
Code: [Select]

   $cmd2 = "insert into $ltable values('null','$nlnum','".addslashes($refcode)."','news@$dom','New List Newsletter','errors@yoursite.com','Welcome!','Welcome to the mailing list!','','','1','Please verify your subscription','Click the link below to verify your email address for subscription to the yoursite.com newsletter\n\n!confirm','','','0','','', '','','','','','','','','','','0;0;0;0;0','$adminmail','0;0','')";

You may also want to add an "or die()" statement to output errors:
Code: [Select]
  mysql_query($cmd2);
TO
Code: [Select]
  mysql_query($cmd2) or die(mysql_error());
Quote
Unfortunately when I didn't think it was working I also did a 'Move' when I didn't want to, now is there any way to COPY those users back to their respective lists - this is really a mess...

Unfortunately this is not possible :(

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

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Extract Hits not creating new list???
« Reply #2 on: May 17, 2006, 09:35:00 am »
For others this post is in relation to the following custom script available in the forum:
http://listmailpro.com/forum/index.php?topic=496.0
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

BGSWebDesign

  • Posts: 625
    • View Profile
    • http://www.bgswebdesign.com
Extract Hits not creating new list???
« Reply #3 on: May 17, 2006, 09:46:49 am »
Hi DW,

Hmm, not sure I understand, the CMD2 I already have is:
Code: [Select]
$cmd2 = "insert into $ltable values('null','$nlnum','".addslashes($refcode)."','news@$dom','New List Newsletter','Welcome!','Welcome to the mailing list!','','','1','Please verify your subscription','Click the link below to verify your email address for subscription to the yoursite.com newsletter\n\n!confirm','','','0','','', '','','','','','','','','','','0;0;0;0;0','$adminmail','0;1','1','1')";

You can see it already has 3 values AFTER the $adminmail, your updated version only has 1, is this correct?

Also, I see that you've added another email address:
Code: [Select]
'errors@yoursite.com',  right before the 'Welcome!', is this correct?

Just confirming, maybe you can just post the correct code in the other thread?  That way I can compare with what I have...
Thanks,
-Brett
http://www.bgswebdesign.com/Contact-Us.php

*** I do custom List Mail Pro installations ***
Contact me through my website (above)

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Extract Hits not creating new list???
« Reply #4 on: May 17, 2006, 11:44:07 am »
I must have been using some old code in my previous example.  I've added the field to the working script:

http://listmailpro.com/forum/index.php?topic=496.msg1767#msg1767

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

BGSWebDesign

  • Posts: 625
    • View Profile
    • http://www.bgswebdesign.com
Extract Hits not creating new list???
« Reply #5 on: May 17, 2006, 01:01:11 pm »
Hi DW,

Quote
must have been using some old code in my previous example. I've added the field to the working script


WHERE?  I've compared the CMD2 up there with what I have on file and it's identical?  What else (if anything) did you change?

I believe it's something more to do than this - in fact I believe I even created new lists before using the old version of extracthits.php - that' why I was shocked when it didn't work...

Anyway, I created a new list - lo and behold it gave it number 99, then I looked at the user database, there were my users - funny thing: some were duplicates (I must have hit append a few times and it appended dupes with different SEQ/DEL numbers in followup?)...   I also don't remember ever seeing that it created a list with followups on it???  Is this thing causing problems because of the new Save/Load Sequences, or something else?

As far as getting them BACK to the list they were on!!!  I'm stuck there - I plan on rolling the whole database back to last nights copy and starting over with my list appending with my Tracked Links (fun, fun), I'm also going to REMOVE the 'Move' button from my extractlinks code - I don't need this trouble again...

So, please tell me, was there ANYTHING else you changed???
Thanks,
-Brett
http://www.bgswebdesign.com/Contact-Us.php

*** I do custom List Mail Pro installations ***
Contact me through my website (above)

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Extract Hits not creating new list???
« Reply #6 on: May 17, 2006, 07:04:50 pm »
Quote
Quote
must have been using some old code in my previous example. I've added the field to the working script

WHERE? I've compared the CMD2 up there with what I have on file and it's identical? What else (if anything) did you change?

Nothing - all I did was add ,'' to the INSERT statement in the existing code.
Quote
Anyway, I created a new list - lo and behold it gave it number 99, then I looked at the user database, there were my users - funny thing: some were duplicates (I must have hit append a few times and it appended dupes with different SEQ/DEL numbers in followup?)...

This seems normal in case the List is not created - the script expects the list to be non-existent.
Quote
I also don't remember ever seeing that it created a list with followups on it???

The script should not create followups.  Are you sure you didn't hit "Copy List" to create the new list 99?
Quote
Is this thing causing problems because of the new Save/Load Sequences, or something else?

I don't see how - nothing has changed except for the addition of a single field to the list insert statement.

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

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Extract Hits not creating new list???
« Reply #7 on: May 17, 2006, 07:15:06 pm »
Please re-copy the code from the script - I don't think my changes made it through properly (slow copy/paste threw me off I think) and the current revision is tested.

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

BGSWebDesign

  • Posts: 625
    • View Profile
    • http://www.bgswebdesign.com
Extract Hits not creating new list???
« Reply #8 on: May 18, 2006, 06:24:21 am »
Hi DW,

Quote
Please re-copy the code from the script - I don't think my changes made it through properly (slow copy/paste threw me off I think) and the current revision is tested.


I only notice one change - the addition of '' field in the $cmd2 call, is that it?  Is that all you changed?

Secondly, I said this:
Quote from: "webshaman"
Quote:
Unfortunately when I didn't think it was working I also did a 'Move' when I didn't want to, now is there any way to COPY those users back to their respective lists - this is really a mess...
and you replied
Quote from: "DW"
Unfortunately this is not possible


Well, this has caused me to have to restore the entire database to last nights copy - using my mysqldump (68MB file), and then re-do all of my extract hits (Appending to the appropriate interested lists)...

I have COMMENTED OUT the Move Button and suggest others consider it as well - IF you don't want to go through what I did - for me, it's NOT very often that I want to move users from one list to another if they click - I only want to know that this is a group of users that clicked, and copy them to a new list of (interested clickers), here is why - if you MOVE them you lose everything - where they were in their Followup Sequence in the other lists, and when they joined the others lists, etc, etc, etc...  it's not worth it for me - in fact a BIG problem to do that...

So, I'm not going to have a Move button in my code -  I suggest DW that you provide at least a popup Message - Are you Sure you want to do this - with the Move button!

One further thing, I did NOT use the New List option - so I'm still not sure it works - since I had such problems with it - instead I just created a new list on my own, and then did the Append option to that new list - avoids all the problems I had before with Followups appearing for the new blank list, etc...
Thanks,
-Brett
http://www.bgswebdesign.com/Contact-Us.php

*** I do custom List Mail Pro installations ***
Contact me through my website (above)