• WordPress database error: [Unknown column ‘post_datepub’ in ‘where clause’]
    SELECT * FROM wp_posts WHERE post_datepub>=SUBDATE(CURRENT_DATE(),INTERVAL 7 DAY)

    First of all, I added a custom field to the wp_posts table. ‘post_datepub’ is a datetime type. The SQL query WORKS when I run it in phpMyAdmin but WordPress doesnt allow me to use this field in the where clause. How I can bypass it? I want to be able to use a custom field in the where clause.

The topic ‘WordPress database error: [Unknown column ‘post_datepub’ in ‘where clause’]’ is closed to new replies.