Updated once more, the fixed file "product-vbdiscountsTYPE-OR-ENGINE-MySQL-Fix.xml" now checks your mysql version and assigns TYPE or ENGINE accordingly

.
Example:
PHP Code:
// Check for TYPE or ENGINE based on version from what I read it was still in 5.1.45 fully but only partially there afterwords - TheLastSuperman
$mysql_version = $db->query_first("SELECT version() AS version");
define('MYSQL_VERSION', $mysql_version['version']);
$type_or_engine = (version_compare(MYSQL_VERSION, '5.1.45', '<')) ? 'TYPE' : 'ENGINE';
$vbulletin->db->query_write("
CREATE TABLE IF NOT EXISTS `". TABLE_PREFIX ."discounts` (
`discountid` int(10) unsigned NOT NULL auto_increment,
`discountname` varchar(50) NOT NULL default '',
`discountvalue` int(3) unsigned NOT NULL default '0',
`discountvalidfrom` DATE,
`discountvalidto` DATE,
PRIMARY KEY (`discountid`)
) $type_or_engine=MyISAM
");