• 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 A.C.C] characters.php

frankfarmer

who'r ninja now
Premium User
Joined
Aug 5, 2008
Messages
1,644
Solutions
1
Reaction score
99
Aff..


Code:
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 '' at line 1' in E:\OTSERVER\xampp\htdocs\characters.php:366 Stack trace: #0 E:\OTSERVER\xampp\htdocs\characters.php(366): PDO->query('SELECT * FROM p...') #1 E:\OTSERVER\xampp\htdocs\index.php(148): include('E:\OTSERVER\xam...') #2 {main} thrown in E:\OTSERVER\xampp\htdocs\characters.php on line 366


Why and why? Trying to lookup a character and this happends. Some players is working but some aren't.. whats the problem?

Happends when you "look" statistics on a character on the website


Thanks in advance
 
Got the same problem, if u search for a character that have been killed by another player, you get this error.
This is on line 366:
Code:
$player_killerr12 = $SQL->query('SELECT * FROM player_killers WHERE kill_id = '.$player_kd.'');
 
Replace it with this:

PHP:
$player_killerr12 = $SQL->query('SELECT * FROM `player_killers` WHERE `kill_id` = '".$player_kd."';');

Might work, not sure though.
 
Code:
Parse error: syntax error, unexpected '"' in E:\OTSERVER\xampp\htdocs\characters.php on line 366

aff
 
This will remove the unexpected " error caused by Zoriaths code. Not sure if it will solve the issue.
PHP:
$player_killerr12 = $SQL->query('SELECT * FROM `player_killers` WHERE `kill_id` = \''.$player_kd.'\';');
 
Yeah sorry you guys are right.. Didn't see gesior used single quotes:p

You can do this too (which looks a bit nicer) :p

PHP:
$player_killerr12 = $SQL->query("SELECT * FROM `player_killers` WHERE `kill_id` = '".$player_kd."';");
 
Fixed my first problem, then i got this

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 '' at line 1' in C:\xampp\htdocs\characters.php:373 Stack trace: #0 C:\xampp\htdocs\characters.php(373): PDO->query('SELECT * FROM p...') #1 C:\xampp\htdocs\index.php(148): include('C:\xampp\htdocs...') #2 {main} thrown in C:\xampp\htdocs\characters.php on line 373


which i have written $player_killerr1 = $SQL->query('SELECT * FROM players WHERE id = '.$kurwa34.'');


Thanks in advance, rep to you all! :)
 
Back
Top