Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
Allie MickaCommitted. Thanks so much esmailzadeh!