Support » Plugin: WP Statistics » Database Table Missing After Installing Version 8.2

  • Resolved dlsilverman

    (@dlsilverman)


    After updating to version 8.2 I am now receiving this message several times a minute:
    WordPress database error Table ‘wp_statistics_historical’ doesn’t exist for query SELECT value FROM wp_statistics_historical WHERE type=’visitors’ made by wp_dashboard, do_meta_boxes, call_user_func, wp_statistics_dashboard_widget, wp_statistics_visitor, WP_Statistics->Get_Historical_Data

    https://wordpress.org/plugins/wp-statistics/

Viewing 15 replies - 16 through 30 (of 31 total)
  • please fix error , at next update ;this error occurred for very websites

    I think the “best practice” is to avoid sql keyword in each field of the database. Like that, there is no confusion.

    Plugin Contributor Greg Ross

    (@gregross)

    It looks like it may be a combination of the syntax and version of MySQL as it has run fine on many sites I’ve tested it on.

    Unfortunately the WordPress database setup code has some limits with using the backticks so I’ll have to see what I can do in the next release.

    I got the same problem in my error logs. DB table missing. Any quick fixes?

    Plugin Contributor Greg Ross

    (@gregross)

    FiD: use the table definition in post #11 and phpMyAdmin to manually create the table.

    Nor the post #11 nor any other post could help me!
    I created the table manually.
    But also there is an error message when I add Statistics widget:

    PHP Warning:
    include(…\httpdocs\wp-content\plugins\wp-statistics/includes/settings/widget.php): failed to open stream: No such file or directory in …\httpdocs\wp-content\plugins\wp-statistics\widget.php on line 225 PHP Warning: include(…\httpdocs\wp-content\plugins\wp-statistics/includes/settings/widget.php): failed to open stream: No such file or directory in …\httpdocs\wp-content\plugins\wp-statistics\widget.php on line 225 PHP Warning: include(): Failed opening ‘…\httpdocs\wp-content\plugins\wp-statistics/includes/settings/widget.php’ for inclusion (include_path=’.;.\includes;.\pear’) in …\httpdocs\wp-content\plugins\wp-statistics\widget.php on line 225.

    Plugin Contributor Greg Ross

    (@gregross)

    pirooz: that would be a bug, you can delete line 225 from the wp-statistics\widget.php.

    My WP Statistics stopped working after the update. Run following SQL and it’s all working now.

    CREATE TABLE wp_statistics_historical (
    key bigint(20) NOT NULL,
    type varchar(25) NOT NULL,
    id bigint(20) NOT NULL,
    uri varchar(255) NOT NULL,
    value bigint(20) NOT NULL,
    PRIMARY KEY (ID),
    KEY type (type),
    UNIQUE KEY id (id),
    UNIQUE KEY uri (uri)
    )

    I got this error after running that command.

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘bigint(20) NOT NULL, type varchar(25) NOT NULL, id bigint(20) NOT NULL, ‘ at line 2

    Thank you. My problem had to do with using the keyword “key” as a column name, not enclosed in back-ticks.

    Problem solved!

    put key in back ticks like david said.

    yeah just noticed that comment here removed the back ticks..
    Glad that you could get it sorted.

    Anybody else coming to this thread, please put back ticks around “key” and “type” in below query, then it should work.

    CREATE TABLE wp_statistics_historical (
    key bigint(20) NOT NULL,
    type varchar(25) NOT NULL,
    id bigint(20) NOT NULL,
    uri varchar(255) NOT NULL,
    value bigint(20) NOT NULL,
    PRIMARY KEY (ID),
    KEY type (type),
    UNIQUE KEY id (id),
    UNIQUE KEY uri (uri)
    )

    Plugin Contributor Greg Ross

    (@gregross)

    The next release of WP Statistics will resolve this issue, it should be out shortly.

    Error not resolved for me after update 8.3 ! but historical table has been create in database.I’m confused!!!

    after remove all old database (visit and visitor ) has been worked!but my data removed.

Viewing 15 replies - 16 through 30 (of 31 total)
  • The topic ‘Database Table Missing After Installing Version 8.2’ is closed to new replies.