function linkTempEmails($key)
 {
     global $application;
     $tables = Subscriptions::getTables();
     $table = 'subscription_temp';
     $columns =& $tables[$table]['columns'];
     $atable = 'email_address';
     $acolumns =& $tables[$atable]['columns'];
     $query = new DB_Update($table);
     $query->addUpdateTable($atable);
     $query->addUpdateExpression($columns['email_id'], $acolumns['email_id']);
     $query->addUpdateValue($columns['state'], SUBSCRIPTION_TEMP_EXISTS);
     $query->WhereValue($columns['action_key'], DB_EQ, $key);
     $query->WhereAND();
     $query->WhereField($columns['email'], DB_EQ, $acolumns['email']);
     $application->db->getDB_Result($query);
     $query = new DB_Update($table);
     $query->addUpdateValue($columns['state'], SUBSCRIPTION_TEMP_DONT_EXISTS);
     $query->WhereValue($columns['action_key'], DB_EQ, $key);
     $query->WhereAND();
     $query->WhereValue($columns['state'], DB_EQ, SUBSCRIPTION_TEMP_UNKNOWN);
     $application->db->getDB_Result($query);
 }