# Do Not Contact

**URL:** <https://forum.mautic.org/t/do-not-contact/4828>\
**Category:** General Discussion\
**Created:** [August 10, 2016, 2:49pm UTC](https://forum.mautic.org/t/do-not-contact/4828 "2016-08-10T14:49:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![eurogroup](https://avatars.discourse-cdn.com/v4/letter/e/e79b87/32.png) [@eurogroup](https://forum.mautic.org/u/eurogroup)\
**Post date:** [August 10, 2016, 2:49pm UTC](https://forum.mautic.org/t/do-not-contact/4828/1 "2016-08-10T14:49:50Z")

</div>

Hi,  
  
  
  
Is there a quick way to identify which contacts have been flagged as do not contact? I would guess with 200K contacts this would beed to be done on the datase direct however I have looked in the database and cannot see any table with a field that has do not contact flagged. Can anyone point me in the right direction.  
  
  
  
Thank in advance

---

<div class="post-metadata">

**Author:** ![eurogroup](https://avatars.discourse-cdn.com/v4/letter/e/e79b87/32.png) [@eurogroup](https://forum.mautic.org/u/eurogroup)\
**Post date:** [August 10, 2016, 2:49pm UTC](https://forum.mautic.org/t/do-not-contact/4828/2 "2016-08-10T14:49:50Z")

</div>

Hi,

Is there a quick way to identify which contacts have been flagged as do not contact? I would guess with 200K contacts this would beed to be done on the datase direct however I have looked in the database and cannot see any table with a field that has do not contact flagged. Can anyone point me in the right direction.

Thank in advance

---

<div class="post-metadata">

**Author:** ![freeformagency](https://avatars.discourse-cdn.com/v4/letter/f/e9c0ed/32.png) [@freeformagency](https://forum.mautic.org/u/freeformagency)\
**Post date:** [August 11, 2016, 9:58pm UTC](https://forum.mautic.org/t/do-not-contact/4828/3 "2016-08-11T21:58:38Z")

</div>

@MxyzptlkFishStix is this table made in the Reporting tab? Or where do you find this?

---

<div class="post-metadata">

**Author:** ![freeformagency](https://avatars.discourse-cdn.com/v4/letter/f/e9c0ed/32.png) [@freeformagency](https://forum.mautic.org/u/freeformagency)\
**Post date:** [August 11, 2016, 11:13pm UTC](https://forum.mautic.org/t/do-not-contact/4828/4 "2016-08-11T23:13:00Z")

</div>

@MxyzptlkFishStix makes sense, is there any way to access this info in the Mautic interface itself?

---

<div class="post-metadata">

**Author:** ![eurogroup](https://avatars.discourse-cdn.com/v4/letter/e/e79b87/32.png) [@eurogroup](https://forum.mautic.org/u/eurogroup)\
**Post date:** [August 12, 2016, 7:13am UTC](https://forum.mautic.org/t/do-not-contact/4828/5 "2016-08-12T07:13:53Z")

</div>

Thanks for that ok so that table uses a foreign key based on the lead table id field so i guess I would have to create a report in phpMyAdmin or similar tool matching the lead.id with lead\_donotcontact.lead\_id rows.

So how are the leads moved over for example I have say 1,000 email addresses with .gov in the title and I would like to bulk edit so that we do not contact them again. If in the same table this would be quite easy changing the row from 0 to 1.

I take it I would need to create some SQL query using LEFT JOIN possibly?

SELECT DISTINCT \*  
FROM leads  
WHERE leads.email CONTAINS (’.gov’)

```
IF (lead_donotcontact.lead_id is NULL, '0', '1')
LEFT JOIN leads.id = lead_donotcontact.lead_id

```

etc etc

---

<div class="post-metadata">

**Author:** ![eurogroup](https://avatars.discourse-cdn.com/v4/letter/e/e79b87/32.png) [@eurogroup](https://forum.mautic.org/u/eurogroup)\
**Post date:** [August 12, 2016, 7:26am UTC](https://forum.mautic.org/t/do-not-contact/4828/6 "2016-08-12T07:26:32Z")

</div>

My general feeling here is that as this is a fairly new instance I am running and assuming my workflows etc are not affected I would be much quicker just deleting the leads table in MySQL ie

SET FOREIGN\_KEY\_CHECKS = 0;  
TRUNCATE leads;  
SET FOREIGN\_KEY\_CHECKS = 1;

So this brings me to my next question If I TRUNCATE this table what affect will this have on linked tables such as the lead\_donotcontact TABLE? Will i need to TRUNCATE this table also?
