Error during creating table
-
I am getting below error during creating mysql table:
Fatal error: Uncaught mysqli_sql_exception: Table 'webdev.wp_ca_shortcodes' doesn't exist in /var/www/html/wp-includes/wp-db.php:2056 Stack trace: #0 /var/www/html/wp-includes/wp-db.php(2056): mysqli_query() #1 /var/www/html/wp-includes/wp-db.php(1945): wpdb->_do_query() #2 /var/www/html/wp-includes/wp-db.php(2695): wpdb->query() #3 /var/www/html/wp-admin/includes/upgrade.php(2749): wpdb->get_results() #4 /var/www/html/wp-content/plugins/clour/admin/Ca_Feeder_Installer.php(201): dbDelta()
?Code that I tried: $table_name = $wpdb->prefix . "ca_shortcodes"; require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); ? ? ? $sql = "CREATE TABLE
{$table_name}
( ? ? ? ? id int(11) unsigned NOT NULL AUTO_INCREMENT, ? ? ? ? shortcode VARCHAR(255) NOT NULL, ? ? ? ? fields longtext NOT NULL, ? ? ? ? fields_name longtext NOT NULL, ? ? ? ? app_name VARCHAR(255) NOT NULL, ? ? ? ? form_id VARCHAR(255) NOT NULL, ? ? ? ? form_name VARCHAR(255) NOT NULL, ? ? ? ? entry_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, ? ? ? ? PRIMARY KEY (id) ? ? ? ) $charset_collate;"; ? ? ? dbDelta($sql);What is wrong here? It is creating the table in localhost but in live server it is showing that table is not exists error ??
Any fix?
Thanks!
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Error during creating table’ is closed to new replies.