MyBB Community Forums

Full Version: My advertisements Help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Today i install my advertisements
http://mods.mybb.com/view/my-advertisements
but when i go in acp to activate plugin i get this error
SQL Error:
1050 - Table 'mybb_myadvertisements_zones' already exists
Query:
CREATE TABLE mybb_myadvertisements_zones ( zid int(10) UNSIGNED NOT NULL auto_increment, name varchar(50)NOT NULL default '', description varchar(300) NOT NULL default '', ads int(10) UNSIGNED NOT NULL default '0', postbit_type smallint(1)UNSIGNED NOT NULL default '1',
postbit_xposts int(10) UNSIGNED NOT NULL default '0', PRIMARY KEY (zid) ) ENGINE=MyISAM
and i dont have phpmyadmin in my host
plz help me

Is there any plugin that delete or create table without phpmyadmin
SAM
it appears that the plugin was installed earlier and plugin files were deleted without uninstalling !
anyway, you can use php comment tags in myadvertisements plugin file to ignore that table creation line.
or you can try using MySquirrel plugin to run SQL queries
Thanks for quick response
can you plz give me the sql query code to create this table
SAM

Or sql query that delete old table

Or sql query that delete old table
(2013-06-17, 06:40 PM).m. Wrote: [ -> ]you can use php comment tags in myadvertisements plugin file to ignore that table creation line.
or you can try using

How would you do this?
^ removing creation of that single database table may not be sufficient
anyway, open the plugin file in a code editor (eg. notepad++) and find code like below (around lines 121 - 129)
$db->write_query("CREATE TABLE `".TABLE_PREFIX."myadvertisements_zones` (
	  `zid` int(10) UNSIGNED NOT NULL auto_increment,
	  `name` varchar(50) NOT NULL default '',
	  `description` varchar(300) NOT NULL default '',
	  `ads` int(10) UNSIGNED NOT NULL default '0',
	  `postbit_type` smallint(1) UNSIGNED NOT NULL default '1',
	  `postbit_xposts` int(10) UNSIGNED NOT NULL default '0',
	  PRIMARY KEY (`zid`)
		) ENGINE=MyISAM");
put /* at the beginning and */ at the end of above code segment, save the file and use it