Title: WordPress database table error
Last modified: January 30, 2017

---

# WordPress database table error

 *  Resolved [PG](https://wordpress.org/support/users/pacificim/)
 * (@pacificim)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/wordpress-database-table-error/)
 * I get the following error on my site when using the latest version of your plugin.
   Is this a bug for you to fix?
 * [29-Jan-2017 01:56:35 UTC] WordPress database error Table ‘x74j0f3g_yutwlep.na5wk83j820u3ifpv2gw_supsystic_ss_shares’
   doesn’t exist for query SELECT network_id, COUNT(*) AS total_shares FROM na5wk83j820u3ifpv2gw_supsystic_ss_shares
   WHERE project_id = 1 AND network_id IN(1,2,3,6,7,18) AND post_id = 2 GROUP BY
   network_id made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-
   loader.php’), include(‘/themes/fortuna/page.php’), the_content, apply_filters(‘
   the_content’), WP_Hook->apply_filters, call_user_func_array, SocialSharing_Projects_Handler-
   >applyContentCallback, SocialSharing_Projects_Handler->build, Rsc_Dispatcher-
   >apply, apply_filters_ref_array, WP_Hook->apply_filters, call_user_func_array,
   SocialSharing_Shares_Module->filterAddProjectShares, SocialSharing_Shares_Model_Shares-
   >getListProjectPageShares

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

 *  Plugin Author [supsystic](https://wordpress.org/support/users/supsysticcom/)
 * (@supsysticcom)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/wordpress-database-table-error/#post-8744491)
 * Hi!
    I’m sorry for such late reply.
 * You need to re-install the plugin.
    If this will not help, open phpmyadmin in
   cpanel, choose a database and on the SQL tab insert and run the code:
 * `CREATE TABLE IF NOT EXISTS`%prefix%shares` (
    `id` INT(11) UNSIGNED NOT NULL
   AUTO_INCREMENT, `network_id` INT(11) UNSIGNED NULL DEFAULT NULL, `project_id`
   INT(11) UNSIGNED NULL DEFAULT NULL, `post_id` INT(11) UNSIGNED NULL DEFAULT NULL,`
   timestamp` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), INDEX`
   FK_%prefix%shares_%prefix%networks` (`network_id`), INDEX `FK_%prefix%shares_%
   prefix%projects` (`project_id`), CONSTRAINT `FK_%prefix%shares_%prefix%networks`
   FOREIGN KEY (`network_id`) REFERENCES `%prefix%networks` (`id`) ON DELETE CASCADE,
   CONSTRAINT `FK_%prefix%shares_%prefix%projects` FOREIGN KEY (`project_id`) REFERENCES`%
   prefix%projects` (`id`) ON DELETE CASCADE ) COLLATE=’utf8_general_ci’ ENGINE=
   InnoDB ;`
 * where `%prefix%` has to be replaced with your database prefix: `na5wk83j820u3ifpv2gw_supsystic_ss_`
 *  Thread Starter [PG](https://wordpress.org/support/users/pacificim/)
 * (@pacificim)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/wordpress-database-table-error/#post-8783665)
 * I uninstalled the plugin and reinstalled it. Unfortunately this did not help 
   and the error continues to occur as you can see below:
 * [08-Feb-2017 11:32:08 UTC] WordPress database error Table ‘x74j0f3g_yutwlep.na5wk83j820u3ifpv2gw_supsystic_ss_shares’
   doesn’t exist for query SELECT network_id, COUNT(*) AS total_shares FROM na5wk83j820u3ifpv2gw_supsystic_ss_shares
   WHERE project_id = 1 AND network_id IN(1,2,3,6,7,18) AND post_id = 2 GROUP BY
   network_id made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-
   loader.php’), include(‘/themes/fortuna/page.php’), the_content, apply_filters(‘
   the_content’), WP_Hook->apply_filters, call_user_func_array, SocialSharing_Projects_Handler-
   >applyContentCallback, SocialSharing_Projects_Handler->build, Rsc_Dispatcher-
   >apply, apply_filters_ref_array, WP_Hook->apply_filters, call_user_func_array,
   SocialSharing_Shares_Module->filterAddProjectShares, SocialSharing_Shares_Model_Shares-
   >getListProjectPageShares
 * I attempted to run the code which you provided but I’m getting the following 
   error:
 * #1059 – Identifier name ‘FK_na5wk83j820u3ifpv2gw_supsystic_ss_shares_na5wk83j820u3ifpv2gw_supsystic_ss_networks’
   is too long
 *  Plugin Author [supsystic](https://wordpress.org/support/users/supsysticcom/)
 * (@supsysticcom)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/wordpress-database-table-error/#post-8787632)
 * Hi!
    We will fix this problem in next version of Social Share Buttons plugin.
   I will inform you about the updates. If you need this fix asap – execute these
   queries on your database –
 * CREATE TABLE IF NOT EXISTS`na5wk83j820u3ifpv2gw_supsystic_ss_shares` (
    `id` 
   INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `network_id` INT(11) UNSIGNED NULL 
   DEFAULT NULL, `project_id` INT(11) UNSIGNED NULL DEFAULT NULL, `post_id` INT(
   11) UNSIGNED NULL DEFAULT NULL, `timestamp` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
   PRIMARY KEY (`id`), INDEX `FK_na5wk83j820u3ifpv2gw_supsystic_ss_networks` (`network_id`),
   INDEX `FK_na5wk83j820u3ifpv2gw_supsystic_ss_projects` (`project_id`), CONSTRAINT`
   FK_na5wk83j820u3ifpv2gw_supsystic_ss_shares_networks` FOREIGN KEY (`network_id`)
   REFERENCES `wp_supsystic_ss_networks` (`id`) ON DELETE CASCADE, CONSTRAINT `FK_na5wk83j820u3ifpv2gw_supsystic_ss_shares_projects`
   FOREIGN KEY (`project_id`) REFERENCES `wp_supsystic_ss_projects` (`id`) ON DELETE
   CASCADE ) COLLATE=’utf8_general_ci’ ENGINE=InnoDB ;
    -  This reply was modified 9 years, 3 months ago by [supsystic](https://wordpress.org/support/users/supsysticcom/).
 *  Thread Starter [PG](https://wordpress.org/support/users/pacificim/)
 * (@pacificim)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/wordpress-database-table-error/#post-8788400)
 * I attempted to run the code you just provided however I’m getting the following
   error:
 * #1064 – 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 ‘EXISTSna5wk83j820u3ifpv2gw_supsystic_ss_shares(
   id INT(11) UNSIGNED NOT NULL A’ at line 1
 *  Plugin Author [supsystic](https://wordpress.org/support/users/supsysticcom/)
 * (@supsysticcom)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/wordpress-database-table-error/#post-8789055)
 * Hello!
    Please try this code –
 *     ```
       CREATE TABLE IF NOT EXISTS na5wk83j820u3ifpv2gw_supsystic_ss_shares (
         id INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
         network_id INT(11) UNSIGNED NULL DEFAULT NULL,
         project_id INT(11) UNSIGNED NULL DEFAULT NULL,
         post_id INT(11) UNSIGNED NULL DEFAULT NULL,
         timestamp TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
         PRIMARY KEY (id),
         INDEX FK_na5wk83j820u3ifpv2gw_supsystic_ss_networks (network_id),
         INDEX FK_na5wk83j820u3ifpv2gw_supsystic_ss_projects (project_id),
         CONSTRAINT FK_na5wk83j820u3ifpv2gw_supsystic_ss_shares_networks FOREIGN KEY (network_id) REFERENCES wp_supsystic_ss_networks (id) ON DELETE CASCADE,
         CONSTRAINT FK_na5wk83j820u3ifpv2gw_supsystic_ss_shares_projects FOREIGN KEY (project_id) REFERENCES wp_supsystic_ss_projects (id) ON DELETE CASCADE
       )
       COLLATE='utf8_general_ci'
       ENGINE=InnoDB
       ;
       ```
   
 *  Thread Starter [PG](https://wordpress.org/support/users/pacificim/)
 * (@pacificim)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/wordpress-database-table-error/#post-8790345)
 * Hello,
 * Unfortunately the provided code failed. I am using InnoDB as the storage engine
   as that may or may not make a difference with the code they you are providing.
 * Error: #1005 – Can’t Create Table — Errno: 150
 * If you could create a .sql file for me to import with the proper table information
   perhaps that would be easier since this is the third attempt that has failed 
   so far.
 *  Plugin Author [supsystic](https://wordpress.org/support/users/supsysticcom/)
 * (@supsysticcom)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/wordpress-database-table-error/#post-8805293)
 * Hi!
    Sorry, I made mistake concerning prefixes. Please try this code. It should
   solve the problem.
 *     ```
       CREATE TABLE IF NOT EXISTS na5wk83j820u3ifpv2gw_supsystic_ss_shares (
         id INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
         network_id INT(11) UNSIGNED NULL DEFAULT NULL,
         project_id INT(11) UNSIGNED NULL DEFAULT NULL,
         post_id INT(11) UNSIGNED NULL DEFAULT NULL,
         timestamp TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
         PRIMARY KEY (id),
         INDEX FK_na5wk83j820u3ifpv2gw_supsystic_ss_networks (network_id),
         INDEX FK_na5wk83j820u3ifpv2gw_supsystic_ss_projects (project_id),
         CONSTRAINT FK_na5wk83j820u3ifpv2gw_supsystic_ss_shares_networks FOREIGN KEY (network_id) REFERENCES na5wk83j820u3ifpv2gw_supsystic_ss_networks (id) ON DELETE CASCADE,
         CONSTRAINT FK_na5wk83j820u3ifpv2gw_supsystic_ss_shares_projects FOREIGN KEY (project_id) REFERENCES na5wk83j820u3ifpv2gw_supsystic_ss_projects (id) ON DELETE CASCADE
       )
       COLLATE='utf8_general_ci'
       ENGINE=InnoDB
       ;
       ```
   
 *  Thread Starter [PG](https://wordpress.org/support/users/pacificim/)
 * (@pacificim)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/wordpress-database-table-error/#post-8805910)
 * The code was applied but I am now seeing the following error:
 * [14-Feb-2017 22:47:51 UTC] WordPress database error Table ‘x74j0f3g_yutwlep.na5wk83j820u3ifpv2gw_supsystic_ss_shares’
   doesn’t exist for query SELECT network_id, COUNT(*) AS total_shares FROM na5wk83j820u3ifpv2gw_supsystic_ss_shares
   WHERE project_id = 1 AND network_id IN(1,2,3,6,7,18) AND post_id = 24334 GROUP
   BY network_id made by require(‘wp-blog-header.php’), wp, WP->main, WP->parse_request,
   do_action_ref_array, WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array,
   rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, call_user_func,
   WP_REST_Posts_Controller->get_items, WP_REST_Posts_Controller->prepare_item_for_response,
   apply_filters(‘the_excerpt’), WP_Hook->apply_filters, call_user_func_array, SocialSharing_Projects_Handler-
   >applyContentCallback, SocialSharing_Projects_Handler->build, Rsc_Dispatcher-
   >apply, apply_filters_ref_array, WP_Hook->apply_filters, call_user_func_array,
   SocialSharing_Shares_Module->filterAddProjectShares, SocialSharing_Shares_Model_Shares-
   >getListProjectPageShares
 *  Plugin Author [supsystic](https://wordpress.org/support/users/supsysticcom/)
 * (@supsysticcom)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/wordpress-database-table-error/#post-8809911)
 * Hello!
    Here is the sql file with code – [https://www.dropbox.com/s/7g1t9bz7zyme8am/supsystic_shares_create.sql?dl=0](https://www.dropbox.com/s/7g1t9bz7zyme8am/supsystic_shares_create.sql?dl=0)
   Also tomorrow we will release new version of Social Share Buttons plugin with
   fixes.
 *  Thread Starter [PG](https://wordpress.org/support/users/pacificim/)
 * (@pacificim)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/wordpress-database-table-error/#post-8811145)
 * It fixed the error this time. Thanks!
 *  [marcosamadeo](https://wordpress.org/support/users/marcosamadeo/)
 * (@marcosamadeo)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/wordpress-database-table-error/#post-8845785)
 * Hey team, I installed and re-installed and im getting
 * database error: [Table ‘df033209201760.wp_0s3ygk95w8_supsystic_ss_views’ doesn’t
   exist]
 * ThoughtS?
 *  Plugin Author [supsystic](https://wordpress.org/support/users/supsysticcom/)
 * (@supsysticcom)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/wordpress-database-table-error/#post-8857182)
 * Hi [@marcosamadeo](https://wordpress.org/support/users/marcosamadeo/)
    Here is
   the sql file with code – [https://www.dropbox.com/s/5la8c62z64et76h/views.sql?dl=0](https://www.dropbox.com/s/5la8c62z64et76h/views.sql?dl=0)
   Please try it.
 *  [molamola281](https://wordpress.org/support/users/molamola281/)
 * (@molamola281)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/wordpress-database-table-error/#post-8863162)
 * Never mind… solved it..
    -  This reply was modified 9 years, 3 months ago by [molamola281](https://wordpress.org/support/users/molamola281/).

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

The topic ‘WordPress database table error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/social-share-buttons-by-supsystic_dee2e2.
   svg)
 * [Social Share Buttons by Supsystic](https://wordpress.org/plugins/social-share-buttons-by-supsystic/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/social-share-buttons-by-supsystic/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/social-share-buttons-by-supsystic/)
 * [Active Topics](https://wordpress.org/support/plugin/social-share-buttons-by-supsystic/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/social-share-buttons-by-supsystic/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/social-share-buttons-by-supsystic/reviews/)

## Tags

 * [Database Error](https://wordpress.org/support/topic-tag/database-error/)

 * 13 replies
 * 4 participants
 * Last reply from: [molamola281](https://wordpress.org/support/users/molamola281/)
 * Last activity: [9 years, 3 months ago](https://wordpress.org/support/topic/wordpress-database-table-error/#post-8863162)
 * Status: resolved