• 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!

Bans - MYSQL problem

Roni123

Hardstyle Never Die < 3 !!!
Joined
Aug 31, 2010
Messages
152
Solutions
1
Reaction score
18
Good Morning,

Dears,

I have problem with "bans" from mysql sometimes in console I have below errors but can't diagnose the problem :/

Lua:
mysql_real_query(): INSERT INTO `bans` (`type`, `value`, `expires`, `added`, `admin_id`, `comment`, `statement`, `reason`, `action`) VALUES (2, 54, 1615830613, 1615225813, 1, 'Automatic', '', 28, 2): MYSQL ERROR: Cannot add or update a child row: a foreign key constraint fails (`illusion`.`bans`, CONSTRAINT `bans_ibfk_1` FOREIGN KEY (`admin_id`) REFERENCES `players` (`id`) ON DELETE SET NULL)

I try to find anything on forum but without success, no one got problem with bans where was "child row" prefix.

OTHire 1.0

Thanks in advance.
 
Good Morning,

Dears,

I have problem with "bans" from mysql sometimes in console I have below errors but can't diagnose the problem :/

Lua:
mysql_real_query(): INSERT INTO `bans` (`type`, `value`, `expires`, `added`, `admin_id`, `comment`, `statement`, `reason`, `action`) VALUES (2, 54, 1615830613, 1615225813, 1, 'Automatic', '', 28, 2): MYSQL ERROR: Cannot add or update a child row: a foreign key constraint fails (`illusion`.`bans`, CONSTRAINT `bans_ibfk_1` FOREIGN KEY (`admin_id`) REFERENCES `players` (`id`) ON DELETE SET NULL)

I try to find anything on forum but without success, no one got problem with bans where was "child row" prefix.

OTHire 1.0

Thanks in advance.
Create player with ID 1 in table players (or edit existing GOD player id). Ban system expects there is character 'admin' (or 'account manager') with ID 1.
 
Can't too, much errors,

View attachment 56040
This error says, you are trying to create player with account_id set to value that does not exist in table accounts (set it to some existing id from table accounts).
To hide most errors, execute this SQL in phpmyadmin:
Code:
set global sql_mode='';
 
This error says, you are trying to create player with account_id set to value that does not exist in table accounts (set it to some existing id from table accounts).
To hide most errors, execute this SQL in phpmyadmin:
Code:
set global sql_mode='';

Dear Gesior,

Thank you so much for help I will try to do my best ;)

Have a nice day !
 

Similar threads

Back
Top