I've installed this module and the Mime Mail requirement. However, I'm getting the following warning when I subscribe

user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE address = 'admin@admin.com' LIMIT 1' at line 2 query: SELECT 1 FROM WHERE address = 'admin@admin.com' LIMIT 1 in /var/www/html/sloan51/sloan51/includes/database.mysql.inc on line 172."

The error with the statement above is that there is not table name after 'FROM'. I've looked at the code to see what table it's trying to query.

function _ezmlm_table($list, $type) {
  $troot = $list->mlm_ezmlm_idx->troot;
  switch ( $type ) {
    
    case 'subscriber':
      return $troot;
    
    case 'moderator':
      return $troot.'_mod';
    
    case 'allow':
      return $troot.'_allow';
    
    case 'deny':
      return $troot.'_deny';
      
    case 'slog':
      return $troot.'_slog';

    case 'post':
      return $troot.'_post';
...

For the 'subscribe' case, "$troot = $list->mlm_ezmlm_idx->troot" tries to get the table prefix" gets the table prefix, if any, then returns just the prefix and no table name. I not entirely understand why. In addition I check to see if I had any of the other tables in the switch in my db _post, _slog, _deny, _allow, _mod and none of there existed. I also looked for any tables that had a column named 'address' and didn't find any.

Do I need another required module or is there a data dictionary for the table that I need to create to get rid of these warnings?

Thanks,

Comments

hkazemz’s picture

number3, did you resolve this issue? I have the same problem. Thanks.

number3’s picture

hkazemz,

No such luck on my end. I've resorted to using another module for the task I needed done.

BMorse’s picture

I'm getting the same error.

What other module did you use instead?

Nigeria’s picture

Priority: Normal » Critical

I have exactly the same issue.

This is the second time I'm going to have it as well. I created a site in Jan 07 and wanted to use the module but got the same error that I'm getting 9 months later!

Any suggestions anybody?

-- Ade Atobatele

number3’s picture

Title: ezmlm*.inc tables » alternate route
Category: support » feature
Priority: Critical » Normal

For anyone getting the same issue. You may want to check out these two modules. They can both be used (some modification is needed though) to do what mail handler essentially does.

1. simplenews - sends news letters http://drupal.org/project/simplenews
2. mailhandler - retrieves mail and posts new content http://drupal.org/project/mailhandler

Cheers,

number3’s picture

Title: alternate route » ezmlm*.inc tables
Category: feature » support

Accidentally changed the title of the support request.

Nigeria’s picture

Thanks...I did that (i.e. simplenews and mailhandler) just a couple of days ago...nice to know that I'm not the only one suffering ;)

Long term I'm going to integrate Octeth oemPro (http://www.octeth.com/products/oempro/) with my installation.

oemPro can read directly from my Drupal database tables so I can manage the whole thing from there.

-- Ade Atobatele

jerdavis’s picture

Status: Active » Closed (fixed)

This is likely a configuration issue, although there were a couple of SQL related bugs in the development version that was available. A new version was just rolled with some fixes and should be available for download shortly. When it comes up, give it a try and if you still have issues let us know.

Also, make sure you have your MLM database properly defined in your settings.php, such as this example:

$db_url["default"] = 'mysqli://user@localhost/drupal5';
$db_url["mlm"] = 'mysqli://user@localhost/drupal5_mlm';

There's a link to a document describing how this is done from the MLM modules administration page, http://drupal.org/node/18429