2013-08-07, 08:57 PM
Hi I have this code that doesn't seems to work can you check it please!
Error
Quote:function badwordblock_activate(){
global $mybb, $db;
if(!$db->table_exists("badwordblock"))
{
$db->query("CREATE TABLE IF NOT EXISTS".TABLE_PREFIX."badwordblock
(
blid
smallint(5) unsigned NOT NULL AUTO_INCREMENT,
badword
varchar(220) NOT NULL DEFAULT '',
PRIMARY KEY (blid
)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;");
}
}
Error
Quote:MyBB has experienced an internal SQL error and cannot continue.
SQL 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 'Type=MyISAM' at line 8
Query:
CREATE TABLE mybb_board_messages (mid
int(10) unsigned NOT NULL auto_increment,message
text NOT NULL,class
varchar(255) NOT NULL,global
tinyint(1) NOT NULL default '1',enabled
tinyint(1) NOT NULL default '0', PRIMARY KEY (mid) ) Type=MyISAM;