You are here

function regcode_mailer_regcode_query_alter in Registration codes 6

Implements hook_regcode_query_alter().

File

regcode_mailer/regcode_mailer.module, line 244

Code

function regcode_mailer_regcode_query_alter(&$query, $count_only, $conditions) {
  $replace = 'LEFT JOIN {regcode_mailer} AS regcode_mailer
              ON (regcode.rid = regcode_mailer.rid)
              WHERE';
  $query = str_replace('WHERE', $replace, $query);
  $replace = ',regcode_mailer.is_sent,regcode_mailer.mailed,regcode_mailer.recipient FROM';
  $query = str_replace(' FROM', $replace, $query);
  $query .= ' GROUP BY regcode.rid';
}