CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • query to bulk delete drafts
Pages: [1]

Author Topic: query to bulk delete drafts  (Read 879 times)

emilyf

  • Ask me questions
  • ****
  • Posts: 696
  • Karma: 54
  • CiviCRM version: 2.x - 4.x
  • CMS version: Drupal 5, 6, 7
query to bulk delete drafts
July 29, 2009, 12:21:49 pm
i have loads of draft/unsent mailings in civimail. since there are no bulk actions for that page, it is going to take hours to manually delete them all.

is there a query i can run on my db to safetly delete these and  not cause any corruption?

thanks much!

emilyf

  • Ask me questions
  • ****
  • Posts: 696
  • Karma: 54
  • CiviCRM version: 2.x - 4.x
  • CMS version: Drupal 5, 6, 7
Re: query to bulk delete drafts
August 10, 2009, 08:46:51 am
just wondering if anyone has a response on this....or do i just clear them out?

emilyf

  • Ask me questions
  • ****
  • Posts: 696
  • Karma: 54
  • CiviCRM version: 2.x - 4.x
  • CMS version: Drupal 5, 6, 7
Re: query to bulk delete drafts
August 10, 2009, 09:08:19 am
well it looks like it's just
DELETE FROM `civicrm_mailing`
WHERE is_completed IS NULL
AND `msg_template_id` IS NULL

i realized the drafts page is really misleading, reporting the total number of mailings in the listings, rather than just the number of drafts. that looks like a bug...created here http://issues.civicrm.org/jira/browse/CRM-4882

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • query to bulk delete drafts

This forum was archived on 2017-11-26.