• Working in a new theme (hidden from users by an admin-only themeswitcher), but I’m getting this error at the beginning of the loop:

    WordPress database error: [Not unique table/alias: ‘wp_post2cat’]
    SELECT DISTINCT * FROM wp_posts LEFT JOIN wp_postmeta ON wp_posts.ID = wp_postmeta.post_id LEFT JOIN wp_post2cat ON (wp_posts.ID = wp_post2cat.post_id) LEFT JOIN wp_categories ON (wp_post2cat.category_id = wp_categories.cat_ID) LEFT JOIN wp_post2cat ON (wp_posts.ID = wp_post2cat.post_id) WHERE 1=1 AND 0=1 AND (category_id = ‘0’) AND (post_date_gmt <= ‘2006-06-27 20:54:59’ AND id NOT IN (-1,14,91) ) AND ((post_status = “publish” OR (post_status = “private” AND (wp_postmeta.meta_key = ‘post_level’ AND wp_postmeta.meta_value <= 0 ))) OR post_author = 1 AND post_status != ‘draft’ AND post_status != ‘static’) AND post_status != “attachment” AND (category_id = 3 OR category_id = 5 OR category_id = 3 OR category_id = 6 OR category_id = 6 OR category_id = 7 OR category_id = 17) GROUP BY wp_posts.ID ORDER BY post_date DESC LIMIT 0, 1

    then the loop returns the 5 most recent posts (which is not part of my loop code).

    I’ve checked mysql database but on the advice of the codex I haven’t done anything because wp-post2cat is part of WordPress’s core.

    I’ve just upgraded from 2.01 to 2.03. Is my database corrupt? Are there somehow 2 databases or an extra table (“not unique table”)?

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘WordPress database error: Not unique table/alias: ‘wp_post2cat’’ is closed to new replies.