Hi, I've been trying to delete some of my posts based upon their category and the date published. I have found an SQL query on this forum:
SELECT a,b,c
FROM wp_posts a
LEFT JOIN wp_term_relationships b ON ( a.ID = b.object_id)
LEFT JOIN wp_postmeta c ON ( a.ID = c.post_id )
LEFT JOIN wp_term_taxonomy d ON ( b.term_taxonomy_id = d.term_taxonomy_id)
WHERE a.post_date < '2010-01-01 00:00:00'
AND d.taxonomy = 'category'
AND d.term_id = x;
but it gives me an SQL error message
#1054 - Unknown column 'a' in 'field list'
Obviously, I have used the correct category value.
Any help gratefully received...