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

[DataBase] Error in DataBase

Carinha

Revolutionary
Joined
Jun 8, 2010
Messages
13
Reaction score
0
Hello guys, I have a problem in my DB, when I import it in XAMPP it's this error:

Code:
Error
SQL query:

DELIMITER | CREATE TRIGGER `ondelete_accounts` BEFORE DELETE ON  `accounts` FOR EACH ROW BEGIN DELETE FROM  `bans` WHERE  `type` IN ( 3, 4 ) AND  `value` = OLD.`id` ;


Mensagens do MySQL : 

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DELIMITER |

CREATE TRIGGER `ondelete_accounts`
BEFORE DELETE
ON `accounts`
FOR ' at line 1

Does someone with more experience could help me?

sorry my bad english!
 
Try to put the DELIMITER command in a different line:

PHP:
DELIMITER |
CREATE TRIGGER `ondelete_accounts` BEFORE DELETE ON  `accounts` FOR EACH ROW BEGIN DELETE FROM  `bans` WHERE  `type` IN ( 3, 4 ) AND  `value` = OLD.`id`;
 
Back
Top