wordpress mysql - delete all custom post type

database, mysql, sql, wordpress

Solution

Solved -

DELETE FROM `wp_posts`
WHERE  `post_type` =  'prefix-numberplates'

worked - took the bottom section out & it was fine.

Problem

I've got a wordpress/mysql set up using the 'custom post type' which currently holds about 40,000 rows of data in the wp_posts table of the database. I'm trying to work on an SQL query that will remove all the rows of a certain custom post type in one go but it keeps telling me I've got a syntax error. The code I'm using is below, apologies if it's simple but SQL is alien to me and I'm struggling to find anything in the forums. ``` DELETE FROM `wp_posts` WHERE `post_type` = 'prefix-numberplates' LIMIT 0 , 3000 ``` There are ` around wp_posts & post_type but it won't let me style them on here. Any help is greatly appreciated.

Original source