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

[Gesior AAC] 0.3.5 fixed v6 problem rep+

quinkan

New Member
Joined
Mar 15, 2009
Messages
125
Reaction score
0
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 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 'WHERE `player_id` = 3980 AND `skillid` = 0' at line 1' in C:\Documents and Settings\Administrator\Desktop\xampp\htdocs\pot\OTS_Player.php:195 Stack trace: #0 C:\Documents and Settings\Administrator\Desktop\xampp\htdocs\pot\OTS_Player.php(195): PDO->query('UPDATE `player_...') #1 C:\Documents and Settings\Administrator\Desktop\xampp\htdocs\accountmanagement.php(752): OTS_Player->save() #2 C:\Documents and Settings\Administrator\Desktop\xampp\htdocs\index.php(178): include('C:\Documents an...') #3 {main} thrown in C:\Documents and Settings\Administrator\Desktop\xampp\htdocs\pot\OTS_Player.php on line 195
Im getting this error everytime im creating a character. Rep+ if you can help me:thumbup: Im getting this error if im using my old database, but if im creating a new one, nothing happends:S i really want my old database to works. Someone help me please:(
 
Last edited:
Code:
DROP TRIGGER IF EXISTS `hej`.`oncreate_players`;
DELIMITER //
CREATE TRIGGER `hej`.`oncreate_players` AFTER INSERT ON `hej`.`players`
 FOR EACH ROW BEGIN
	INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 0, 10);
	INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 1, 10);
	INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 2, 10);
	INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 3, 10);
	INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 4, 10);
	INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 5, 10);
	INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 6, 10);
END
//
DELIMITER ;
DROP TRIGGER IF EXISTS `hej`.`ondelete_players`;
DELIMITER //
CREATE TRIGGER `hej`.`ondelete_players` BEFORE DELETE ON `hej`.`players`
 FOR EACH ROW BEGIN
	DELETE FROM `bans` WHERE `type` = 2 AND `value` = OLD.`id`;
	UPDATE `houses` SET `owner` = 0 WHERE `owner` = OLD.`id`;
END
//
DELIMITER ;

instead of "hej" write your database, not sure, but it worked for me.
 
Back
Top