MyBB Community Forums

Full Version: Spider bots plugin - MyBB SQL Error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've uploaded the bots.php file to the plugins folder, but when I try to activate the plugin I get this error message:

"MyBB SQL Error
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 10
Query:
CREATE TABLE IF NOT EXISTS mybb_spiders ( sid int(10) unsigned NOT NULL auto_increment, name varchar(100) NOT NULL default '', theme int(10) unsigned NOT NULL default '0', language varchar(20) NOT NULL default '', usergroup int(10) unsigned NOT NULL default '0', useragent varchar(200) NOT NULL default '', lastvisit bigint(30) NOT NULL default '0', PRIMARY KEY (sid) ) TYPE=MyISAM
Please contact the MyBB Group for support."

How do I solve this?
Edit the plugin file and change TYPE=MyISAM to ENGINE=MyISAM
(2012-03-23, 06:43 AM)Nathan Malcolm Wrote: [ -> ]Edit the plugin file and change TYPE=MyISAM to ENGINE=MyISAM

I found this: ENGINE=MyISAM".$db->build_create_table_collation()); but I couldn't find TYPE=MyISAM

I tried to change ENGINE to TYPE, but it didn't help.
Open ./inc/plugins/bots.php file and find;
$db->write_query("CREATE TABLE IF NOT EXISTS `".TABLE_PREFIX."spiders` (
	  `sid` int(10) unsigned NOT NULL auto_increment,
	  `name` varchar(100) NOT NULL default '',
	  `theme` int(10) unsigned NOT NULL default '0',
	  `language` varchar(20) NOT NULL default '',
	  `usergroup` int(10) unsigned NOT NULL default '0',
	  `useragent` varchar(200) NOT NULL default '',
	  `lastvisit` bigint(30) NOT NULL default '0',
	  PRIMARY KEY  (`sid`)
			) TYPE=MyISAM");
and Change;
TYPE=MyISAM
to;
ENGINE=MyISAM
Many thanks to the both of you. I got it to work with your help!