WordPress.org

Ready to get started?Download WordPress

Forums

Multisite Global Search
[resolved] Getting the error: The used SELECT statements have a different num (3 posts)

  1. Andrew Tetlaw
    Member
    Posted 3 years ago #

    I got the activation "cannot create view" error, but my DB user already had the right privileges. The exact SQL error was:

    The used SELECT statements have a different number of columns

    I discovered that my multi-site install had a couple of old blogs and the wp_posts table had an extra column "post_category". Apparently this was removed in v2.8. The old blogs on my site have this column the newer ones don't.

    The plugin activation runs an SQL UNION query to create a view, and UNIONs are only possible if all the tables have exactly the same schema.

    So if you're having this problem it might be because you started the site (like me) in WordPress MU 2.8.

    I suppose the answer is to remove the column from the wp_posts table for the older blogs, as it's totally unused anyway.

    http://wordpress.org/extend/plugins/multisite-global-search/

  2. aliciagh
    Member
    Plugin Author

    Posted 3 years ago #

    Thanks!!
    Your information is very useful to resolve some bugs in my plugin.
    The next upgrade, 1.2.5, fixes that problem. It will be available in few days.

  3. aliciagh
    Member
    Plugin Author

    Posted 3 years ago #

    I've just upgraded the plugin. Check if your problem is resolved.

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic