• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Limit 1

Verdis

Ciekawy świata.
Joined
May 28, 2012
Messages
394
Reaction score
9
Location
Poland
Siemka,
Jak dodać do tego:
Code:
$SQL->query("INSERT INTO `sellchar` VALUES ('".$player_id ."','".$player_name."','".$player['vocation']."','".$account_id."')");
LIMIT 1, dokładnie w jakie miejsce, bo próbowałem wszędzie, oto skutek:
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 'LIMIT 1' at line 1' in C:\vXampp\htdocs\sellcharlist.php:32 Stack trace: #0 C:\vXampp\htdocs\sellcharlist.php(32): PDO->query('INSERT INTO `se...') #1 C:\vXampp\htdocs\index.php(122): include('C:\vXampp\htdoc...') #2 {main} thrown in C:\vXampp\htdocs\sellcharlist.php on line 32
Chę, aby tylko raz zostały wartości pobrane z bazy danych, gdyż potem powtarzać się będą id
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '7' for key 'PRIMARY'' in C:\vXampp\htdocs\sellcharlist.php:32 Stack trace: #0 C:\vXampp\htdocs\sellcharlist.php(32): PDO->query('INSERT INTO `se...') #1 C:\vXampp\htdocs\index.php(122): include('C:\vXampp\htdoc...') #2 {main} thrown in C:\vXampp\htdocs\sellcharlist.php on line 32
 
Last edited:
Back
Top