1
andrey3761
REFERENCES in mysql.sql

Created in the module file mysql.sql with the following contents:

CREATE TABLE `video_cat` (
  `
cidint(5unsigned NOT NULL AUTO_INCREMENT,
  `
pidint(5unsigned NOT NULL DEFAULT '0',
  `
titlevarchar(255NOT NULL DEFAULT '',
  `
imgurlvarchar(255NOT NULL DEFAULT '',
  `
descriptiontext NOT NULL,
  `
weightint(11NOT NULL DEFAULT '0',
  `
datecreatedint(10NOT NULL DEFAULT '0',
  `
dateupdatedint(10NOT NULL DEFAULT '0',
  `
metakeywordsvarchar(255NOT NULL DEFAULT '',
  `
metadescriptionvarchar(255NOT NULL DEFAULT '',
  
PRIMARY KEY (`cid`),
  
KEY `pid` (`pid`)
ENGINE=InnoDB ;

CREATE TABLE `video_video` (
  `
videoidint(11unsigned NOT NULL AUTO_INCREMENT,
  `
cidint(5unsigned NOT NULL DEFAULT '0',
  `
uidint(11unsigned NOT NULL DEFAULT '0',
  `
titlevarchar(255NOT NULL DEFAULT '',
  `
statustinyint(1unsigned NOT NULL DEFAULT '0',
  `
hometextmediumtext NOT NULL,
  `
bodytextmediumtext NOT NULL,
  `
datecreatedint(10NOT NULL DEFAULT '0',
  `
dateupdatedint(10NOT NULL DEFAULT '0',
  `
metakeywordsvarchar(255NOT NULL,
  `
metadescriptionvarchar(255NOT NULL,
  `
commentsint(11unsigned NOT NULL DEFAULT '0',
  `
ratingdouble(6,4NOT NULL DEFAULT '0.0000',
  `
votesint(11unsigned NOT NULL DEFAULT '0',
  `
hitsint(11unsigned NOT NULL DEFAULT '0',
  `
dohtmltinyint(1unsigned NOT NULL DEFAULT '0',
  `
dosmileytinyint(1unsigned NOT NULL DEFAULT '0',
  `
doxcodetinyint(1unsigned NOT NULL DEFAULT '0',
  `
dobrtinyint(1unsigned NOT NULL DEFAULT '0',
  `
videofilevarchar(255NOT NULL DEFAULT '',
  `
videowidthsmallint(5unsigned NOT NULL DEFAULT '0',
  `
videoheightsmallint(5unsigned NOT NULL DEFAULT '0',
  `
videosizeint(11unsigned NOT NULL DEFAULT '0',
  `
videodurationsmallint(5unsigned NOT NULL DEFAULT '0',
  `
imagefilevarchar(255NOT NULL DEFAULT '',
  
PRIMARY KEY (`videoid`),
  
KEY `cid` (`cid`),
  
KEY `status` (`status`)
ENGINE=InnoDB ;

ALTER TABLE `video_video`
  
ADD CONSTRAINT `fk_cidFOREIGN 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
$pattern3 "/(REFERENCES)(\s)+([`]?)([^`\s]+)\\3(\s)?$/siU";
$replace "\\1 " $prefix "_\\4\\5";
preg_replace($pattern3 $replace$query);

Login

Who's Online

181 user(s) are online (119 user(s) are browsing Support Forums)


Members: 0


Guests: 181


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits