line 225 and 245 of send.api.inc has a problem, with using database prefix.
these must change from:

     if ($table) {
        if ($row = db_fetch_array(db_query("SELECT * FROM {$table} 
          WHERE scid = %d", $row->scid))) {

          foreach ($row as $key => $val) $contact->key = $contact->val;
        }
      }
    }
  }
  elseif ($table) {
    // Search the table for a unique value.
    $schema = drupal_get_schema($table);
    $query = array();
    if (isset($schema['unique keys'])) {
      foreach ($schema['unique keys'] as $keys) {
        foreach ($keys as $key) {
          $place = db_type_placeholder($schema['fields'][$key]['type']);
          $query[] = "$key = $place";
          $values[] = $contact->$key;
        }
      }
      if ($row = db_fetch_array(db_query("SELECT * FROM {$table} 

to:

     if ($table) {
        if ($row = db_fetch_array(db_query('SELECT * FROM {'.$table.'} 
          WHERE scid = %d', $row->scid))) {

          foreach ($row as $key => $val) $contact->key = $contact->val;
        }
      }
    }
  }
  elseif ($table) {
    // Search the table for a unique value.
    $schema = drupal_get_schema($table);
    $query = array();
    if (isset($schema['unique keys'])) {
      foreach ($schema['unique keys'] as $keys) {
        foreach ($keys as $key) {
          $place = db_type_placeholder($schema['fields'][$key]['type']);
          $query[] = "$key = $place";
          $values[] = $contact->$key;
        }
      }
      if ($row = db_fetch_array(db_query('SELECT * FROM {'.$table.'} 
         WHERE '. join(' AND ', $query), $values))) {

Comments

Allie Micka’s picture

Status: Active » Fixed

Committed. Thanks so much esmailzadeh!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.