WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Multisite Global Search] Getting the error: The used SELECT statements have a different num

[Resolved] [Plugin: Multisite Global Search] Getting the error: The used SELECT statements have a different num

  • 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/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author aliciagh
    Member

    @aliciagh

    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.

    Plugin Author aliciagh
    Member

    @aliciagh

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

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] [Plugin: Multisite Global Search] Getting the error: The used SELECT statements have a different num’ is closed to new replies.