Author Topic: [Bug] Import mySQL database  (Read 3041 times)

ihsreal

  • Posts: 19
    • View Profile
    • http://www.IHSRealty.com
[Bug] Import mySQL database
« on: February 04, 2007, 08:20:23 pm »
I have my user list in a separate database on the same server as the listmail database (the user list is in ihsreal_ihs and the listmail database is in ihsreal_listmail. Is it possible to import from a separate database? The reason I ask is when I tried I get a message that says:

admin-30-Table 'ihsreal_ihs.lm_lists' doesn't exist

so it looks like it's looking for the user table in to be in the ihsreal_listmail database

any suggestions?

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
[Bug] Import mySQL database
« Reply #1 on: February 06, 2007, 02:20:20 am »
Someone just reported this less than a month ago but I can't recall if I found a fix.  In my recent files it still seems to be a problem.  I'm going to have to test this.  If I can't figure it out within the next few hours I'll have to do it tomorrow.  If you want me to apply the fix directly to your installation please submit your info.

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

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
[Bug] Import mySQL database
« Reply #2 on: February 06, 2007, 03:28:15 am »
After much testing I figured it out.  I previously HAD solved the problem, but I found another one just now.

The first issue is this:

in admin.php look for the line "function getcfields"

Change the first few lines to this, with changes in bold:

function getcfields($list,$xtra=''){
 global $ltable, $link;
 if($xtra=='users') $terse = 1;
 $cmd = "select field1,field2,field3,field4,field5,field6,field7,field8,field9,field10 from $ltable where listnum = '$list' limit 1";
 $lrow = mysql_query($cmd,$link) or die('admin-30-'.mysql_error());

Now, that solves it partially, however there is STILL a problem -if- the second database access info is the SAME as the ListMail config.php info.  In such cases PHP appears to apply the same "Resource ID #" to both MySQL connections and again we get the admin-30 error.  I will have to do further testing to fix this.

Until then you may want to try setting up an additional user with access to the target database and using that user information for import.

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

costade

  • Posts: 3
    • View Profile
    • http://www.workfromhome-opportunities.com/6k4ufeeder/splash.html
[Bug] Import mySQL database
« Reply #3 on: March 31, 2007, 03:39:25 am »
Hi there,

I did as describe but for some reasons it doesn't use the table name I entered BUT lm_lists instead???

And I don't use same connection details

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
[Bug] Import mySQL database
« Reply #4 on: March 31, 2007, 09:12:02 am »
Greetings,

Please submit a report along with your details and I will try to explain this.

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

costade

  • Posts: 3
    • View Profile
    • http://www.workfromhome-opportunities.com/6k4ufeeder/splash.html
[Bug] Import mySQL database
« Reply #5 on: April 01, 2007, 04:54:22 am »
Hi DW,

I have created a ticket :)

Robert

costade

  • Posts: 3
    • View Profile
    • http://www.workfromhome-opportunities.com/6k4ufeeder/splash.html
[Bug] Import mySQL database
« Reply #6 on: April 04, 2007, 02:57:28 am »
Hi DW,

Any news on the ticket - I haven't heard anything ??

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
[Bug] Import mySQL database
« Reply #7 on: April 05, 2007, 12:32:05 am »
Sorry - I was away for a day visiting family - I have replied now.
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting