Answers.Body: <p>If you have used the "Test-Drive" mode of the form, there may be test registrations for the event. Those may prevent deleting the event but would don't show up in search unless you untick "yes" on "Participant is a Test?".</p>
  
  <p>Maybe you can delet the event after you removed the test registrations - obviously force deleting should be the last resort :)</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-10T00:00:37.017Z
Answers.Text: I did remove all registrations test and otherwise but unfortunately no luck. Darn. It's really weird.
Answers.UserDisplayName: carclubadmin
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-10T06:29:12.583Z
Answers.Text: Hmmm then I am out of ideas except for cleanung all caches, restarting the server etc. - but that's a long shot and you probably already tried it.
Answers.UserDisplayName: Fabian
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-09T14:21:18.753Z
Answers.LastActivityDate: 2015-11-09T14:21:18.753Z
Answers.UserDisplayName: Fabian
Answers.Body: <ol>
  <li><p>backup your database.</p></li>
  <li><p><code>DELETE from civicrm_event WHERE id=1</code></p></li>
  </ol>
  
  <p>You can change 1 to another number, or use a different operator such as id>1</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-21T08:32:21.727Z
Answers.Text: Is it Ok to do this if the event still has participants?     can you do it for multiple events in the one line?
Answers.UserDisplayName: Robinnz
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-09T00:04:00.033Z
Answers.LastActivityDate: 2015-11-09T00:04:00.033Z
Answers.UserDisplayName: CiviTeacher
Answers.Body: <p>Use the API explorer :</p>
  
  <pre><code>$result = civicrm_api3('Event', 'delete', array(
    'sequential' =&gt; 1,
    'id' =&gt; &lt;your_event_id&gt;,
  ));
  </code></pre>
  
  <p>This will delete the event along with the related participant.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-10T00:06:11.233Z
Answers.Text: Oh yes, cooking with gas. It works. Thanks.
Answers.UserDisplayName: carclubadmin
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-09T06:36:42.087Z
Answers.LastActivityDate: 2015-11-09T06:36:42.087Z
Answers.UserDisplayName: jitendra - fuzion
Body: <p>I have a few test events I registered a single user for. I then removed the single user from all the events but when I go to delete the event I get a message the event still has participants. There are no participants when I do a search. It appears to be some sort of bug. How do I force delete the event? Is there a way to get rid of it via MySQL if the GUI won't comply?</p>
  
  <p>CiviCRM 4.6.9
  Drupal 7.41</p>
  
  <p>Thanks</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-11-09T00:02:34.073Z
Comments.Text: Try searching for "test participant" via "Find Participant"
Comments.UserDisplayName: CiviTeacher
Tags: <civievent>
Title: How can I force delete an event
ThreadText: # How can I force delete an event
  
  (Asked by: username_0 on 2015-11-08)
  
  I have a few test events I registered a single user for. I then removed the single user from all the events but when I go to delete the event I get a message the event still has participants. There are no participants when I do a search. It appears to be some sort of bug. How do I force delete the event? Is there a way to get rid of it via MySQL if the GUI won't comply?
  
  CiviCRM 4.6.9
  Drupal 7.41
  
  Thanks
  
  **Tags:** civievent
  
  > **Comments:**
  > **username_1**: Try searching for "test participant" via "Find Participant"  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_4 on 2015-11-09. Score: 3 | Accepted answer
  
  Use the API explorer :
  $result = civicrm_api3('Event', 'delete', array(
    'sequential' => 1,
    'id' => ,
  ));
  
  This will delete the event along with the related participant.
  
  > **Comments:**
  > **username_0**: Oh yes, cooking with gas. It works. Thanks.  
  
  ---
  
  ### Answer by username_2 on 2015-11-09. Score: 2
  
  If you have used the "Test-Drive" mode of the form, there may be test registrations for the event. Those may prevent deleting the event but would don't show up in search unless you untick "yes" on "Participant is a Test?".
  
  Maybe you can delet the event after you removed the test registrations - obviously force deleting should be the last resort :)
  
  > **Comments:**
  > **username_0**: I did remove all registrations test and otherwise but unfortunately no luck. Darn. It's really weird.  
  > **username_2**: Hmmm then I am out of ideas except for cleanung all caches, restarting the server etc. - but that's a long shot and you probably already tried it.  
  
  ---
  
  ### Answer by username_1 on 2015-11-09. Score: 2
  
  1. backup your database.
  2. `DELETE from civicrm_event WHERE id=1`
  
  You can change 1 to another number, or use a different operator such as id>1
  
  > **Comments:**
  > **username_3**: Is it Ok to do this if the event still has participants?     can you do it for multiple events in the one line?  
  
  ---
  
  