Created in the module file mysql.sql with the following contents:
le="color: #000000"><?php CREATE TABLE `video_cat` ( `cid` int(5) unsigned NOT NULL AUTO_INCREMENT, `pid` int(5) unsigned NOT NULL DEFAULT '0', `title` varchar(255) NOT NULL DEFAULT '', `imgurl` varchar(255) NOT NULL DEFAULT '', `description` text NOT NULL, `weight` int(11) NOT NULL DEFAULT '0', `datecreated` int(10) NOT NULL DEFAULT '0', `dateupdated` int(10) NOT NULL DEFAULT '0', `metakeywords` varchar(255) NOT NULL DEFAULT '', `metadescription` varchar(255) NOT NULL DEFAULT '', PRIMARY KEY (`cid`), KEY `pid` (`pid`) ) ENGINE=InnoDB ; CREATE TABLE `video_video` ( `videoid` int(11) unsigned NOT NULL AUTO_INCREMENT, `cid` int(5) unsigned NOT NULL DEFAULT '0', `uid` int(11) unsigned NOT NULL DEFAULT '0', `title` varchar(255) NOT NULL DEFAULT '', `status` tinyint(1) unsigned NOT NULL DEFAULT '0', `hometext` mediumtext NOT NULL, `bodytext` mediumtext NOT NULL, `datecreated` int(10) NOT NULL DEFAULT '0', `dateupdated` int(10) NOT NULL DEFAULT '0', `metakeywords` varchar(255) NOT NULL, `metadescription` varchar(255) NOT NULL, `comments` int(11) unsigned NOT NULL DEFAULT '0', `rating` double(6,4) NOT NULL DEFAULT '0.0000', `votes` int(11) unsigned NOT NULL DEFAULT '0', `hits` int(11) unsigned NOT NULL DEFAULT '0', `dohtml` tinyint(1) unsigned NOT NULL DEFAULT '0', `dosmiley` tinyint(1) unsigned NOT NULL DEFAULT '0', `doxcode` tinyint(1) unsigned NOT NULL DEFAULT '0', `dobr` tinyint(1) unsigned NOT NULL DEFAULT '0', `videofile` varchar(255) NOT NULL DEFAULT '', `videowidth` smallint(5) unsigned NOT NULL DEFAULT '0', `videoheight` smallint(5) unsigned NOT NULL DEFAULT '0', `videosize` int(11) unsigned NOT NULL DEFAULT '0', `videoduration` smallint(5) unsigned NOT NULL DEFAULT '0', `imagefile` varchar(255) NOT NULL DEFAULT '', PRIMARY KEY (`videoid`), KEY `cid` (`cid`), KEY `status` (`status`) ) ENGINE=InnoDB ; ALTER TABLE `video_video` ADD CONSTRAINT `fk_cid` FOREIGN KEY (`cid`) REFERENCES `video_cat` (`cid`);
When installing the module error (not a database table 'video_cat').
Please add a prefix to the table and query REFERENCES, for example:
file:
/class/database/sqlutility.php
le="color: #000000"><?php $pattern3 = "/(REFERENCES)(\s)+([`]?)([^`\s]+)\\3(\s)?$/siU"; $replace = "\\1 " . $prefix . "_\\4\\5"; preg_replace($pattern3 , $replace, $query);