I have a syntax error!

Avatar
  • Answered
I saw you have helped a few people with correcting syntax errors so you just may know this stuff. I got to ask, do you know why my Joomla Installation keep saying this same error over and over again? I tried using different mysql database name for example user_joomla and user_site but still this error seems to occur. Here's the error by the way:

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 CHARACTER SET `utf8`' at line 29 SQL=CREATE TABLE `jos_banner` ( `bid` int(11) NOT NULL auto_increment, `cid` int(11) NOT NULL default '0', `type` varchar(30) NOT NULL default 'banner', `name` varchar(255) NOT NULL default '', `alias` varchar(255) NOT NULL default '', `imptotal` int(11) NOT NULL default '0', `impmade` int(11) NOT NULL default '0', `clicks` int(11) NOT NULL default '0', `imageurl` varchar(100) NOT NULL default '', `clickurl` varchar(200) NOT NULL default '', `date` datetime default NULL, `showBanner` tinyint(1) NOT NULL default '0', `checked_out` tinyint(1) NOT NULL default '0', `checked_out_time` datetime NOT NULL default '0000-00-00 00:00:00', `editor` varchar(50) default NULL, `custombannercode` text, `catid` INTEGER UNSIGNED NOT NULL DEFAULT 0, `description` TEXT NOT NULL DEFAULT '', `sticky` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0, `ordering` INTEGER NOT NULL DEFAULT 0, `publish_up` datetime NOT NULL default '0000-00-00 00:00:00', `publish_down` datetime NOT NULL default '0000-00-00 00:00:00', `tags` TEXT NOT NULL DEFAULT '', `params` TEXT NOT NULL DEFAULT '', PRIMARY KEY (`bid`), KEY `viewbanner` (`showBanner`), INDEX `idx_banner_catid`(`catid`) ) TYPE=MyISAM CHARACTER SET `utf8`

Sincerely yours,
Trivi from Finland
Avatar
Scott
Hello Trivi,

The error lets you know that the syntax error occurs near "TYPE=MyISAM CHARACTER SET `utf8`". This is at the very end of the query. This query used to be correct, but in the latest versions of MySQL, it has decided that "TYPE=" should be replaced with "ENGINE=". So, you will need to find the code that creates that query and change it to "ENGINE=" instead of "TYPE=". The query will then work just fine.

Kindest Regards,
Scott M