• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Solved ZnoteACC Database problem

Prox Plox

New Member
Joined
Mar 26, 2016
Messages
66
Reaction score
0
Hello!
When I try to create the database tables for Znote, this happens:

The error that appears after I click go:
Code:
Error
SQL query:


CREATE TABLE IF NOT EXISTS `znote_guild_wars` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `limit` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  FOREIGN KEY (`id`) REFERENCES `guild_wars` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1
MySQL said: Documentation

#1215 - Cannot add foreign key constraint

What should I do here?
appreciate help!
 
do you have the table "guild_wars" created? cus of the error I mean:
FOREIGN KEY (`id`) REFERENCES `guild_wars` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
 
If you're using an server without guild war system, simply remove this from the SQL Query (in phpmyadmin):
Code:
CREATE TABLE IF NOT EXISTS `znote_guild_wars` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `limit` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  FOREIGN KEY (`id`) REFERENCES `guild_wars` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

Then disable guild_wars in config.php.
 
Have the same problem:
https://otland.net/threads/problem-with-znote.244868/

Couldn't get this fix yet, I didn't understand where to disable guild_wars, anyway when I deleted this
Code:
CREATE TABLE IF NOT EXISTS `znote_guild_wars` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `limit` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  FOREIGN KEY (`id`) REFERENCES `guild_wars` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
The SQL code just get the value to 0, that means deleted :confused:
 
Back
Top