I have large database with posts of Wordpress. I mean over 500 000 rows. And I would like to DELETE rows, in where are posts shorter than 50 characters and older than 60 days. (both contitions have to be realize together). The CODE is only my experiment, how it do.... SELECT * FROM `wp_posts` WHERE `post_type` = 'post' AND DATEDIFF( NOW( ) , `post_date` ) >350 AND LENGTH( `post_content` ) <50 so SELECT is for selecting, I use than DELETE... but it is not working. Whats is wrong? Thanks a lot. Peter PS: I am newbie...sorry
Let's see the actual DELETE statement that's not working. (I'm assuming that the SELECT statement actually returns something.) The only difference is that you replace SELECT * with DELETE (no *).