php - Wordpress table not being created -


i have been trying create new table wordpress plugin few hours without success.

my best guess there error in sql cannot find. have been trying @ wordpress codex , other sources without success. apprechiate help!

 register_activation_hook( __file__, 'plugin_install' );   function plugin_install(){    require_once( abspath . 'wp-admin/includes/upgrade.php' );    global $wpdb;     $table_name = $wpdb->prefix . 'dbname';    $charset_collate = $wpdb->get_charset_collate();     $sql_create_table = "create table $table_name (            id mediumint(9) not null primary key auto_increment,            b_id int(11) not null,            iprefix varchar(20) not null default '0',            istart bigint(20) not null default 'updated',            iend bigint(20) unsigned not null default '0',            isuffix varchar(20) not null default 'post',            primary key  (id)       ) $charset_collate; ";        dbdelta( $sql_create_table );    } 

in fourth line of create sql code have unsigned varchar. remove unsigned keyword , should fine.


Comments