how to automatically blacklist unsubscribed emails on interspire email marketer

Reading Time: < 1 minute

Simply create a trigger which will insert unsubscribed users in the blacklist after every update on the subscriber table.

CREATE TRIGGER `banned_email` AFTER UPDATE ON `iem_list_subscribers` 
FOR EACH ROW INSERT IGNORE INTO ya_banned_emails 
(emailaddress, list, bandate)
SELECT emailaddress, ‘g’, UNIX_TIMESTAMP( ) 
FROM iem_list_subscribers
WHERE unsubscribed != ‘0’;

Reset the default drupal theme with SQL

Reading Time: < 1 minute Sometimes a drupal theme can be broken and it can be needed to reset the default theme so the site can be accessed again in order to fix the problem.

As a rule of thumb I always try to use the theme "Cube" for the administrive part of drupal. that makes things a lot easier and if you breeak the theme you can at least still use the admin part.

Here is anyhow how to reset the theme using SQL:

Simply execute the three following commands:

UPDATE system SET status=1 WHERE name = 'garland';

How to find which SQL is executed by a process

Reading Time: < 1 minute

If you are looking for the last SQL query ran by a specific process, try this: 

 
select substr(sa.sql_text,1,1000) txt
from v$process p, v$session s, v$sqlarea sa
where p.addr=s.paddr
and s.username is not null
and s.sql_address=sa.address(+)
and s.sql_hash_value=sa.hash_value(+)
and spid=&SPID;