I am creating a few tables and I getting the following message:
The plugin generated 440 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.
Here is the code:
global $wpdb; require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); $table_name = $wpdb->prefix . jp_event_table; $sql = "CREATE TABLE IF NOT EXISTS $table_name ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, event_id BIGINT(20) UNSIGNED NOT NULL, name VARCHAR(50) NOT NULL, description TEXT, spaces INT, PRIMARY KEY (ticket_id) ) ENGINE=InnoDB ;"; dbDelta($sql); $sqlcomm = "CREATE TABLE IF NOT EXISTS WP_AWESOME_TABLES ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, PRIMARY KEY (id) ) ENGINE=InnoDB ;"; dbDelta($sqlcomm);
I have searched around but I cannot find a solution to this. I am aware that using dbDelta() has a few weirdnesses to it (like having to have exactly two spaces after PRIMARY KEY), but did I miss anything?
More importantly: Is there some way for me to see what characters are being returned? Could it be an error message that would tell me what line of code is throwing the error? I have PHP debugging turned on but nothing is getting printed out.
Any suggestions would be extremely appreciated!