Skip to content

Instantly share code, notes, and snippets.

@cole007

cole007/entries.sql Secret

Created Jan 14, 2016
Embed
What would you like to do?
DELETE FROM craft_entries WHERE sectionId = 18;
DELETE elements FROM craft_entries AS entries, craft_elements AS elements WHERE entries.id = elements.id AND entries.sectionId = 18;
DELETE relations FROM craft_entries AS entries, craft_relations AS relations WHERE entries.id = relations.sourceId AND entries.sectionId = 18;
DELETE versions FROM craft_entries AS entries, craft_entryversions AS versions WHERE entries.id = versions.entryId AND entries.sectionId = 18;
DELETE content FROM craft_entries AS entries, craft_content AS content WHERE entries.id = content.elementId AND entries.sectionId = 18;
DELETE i18n FROM craft_entries AS entries, craft_elements_i18n AS i18n WHERE entries.id = i18n.elementId AND entries.sectionId = 18;
DELETE drafts FROM craft_entries AS entries, craft_entrydrafts AS drafts WHERE entries.id = drafts.entryId AND entries.sectionId = 18;
DELETE search FROM craft_entries AS entries, craft_searchindex AS search WHERE entries.id = search.elementId AND entries.sectionId = 18;
DELETE elements FROM craft_entries AS entries, craft_structureelements AS elements WHERE entries.id = elements.elementId AND entries.sectionId = 18;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.