Answer the question
In order to leave comments, you need to log in
SQLite - Where is the error here?
I've already broken my head, but I can't find the error
public function accept(Player $player) {
$playerName = strtolower($player->getName());
$stmt = self::getDB()->prepare('UPDATE clan_players SET status = :status
WHERE player = :player AND clan_id = :id AND status = :invite LIMIT 1');
$stmt->bindValue(':id', $this->getId(), SQLITE3_INTEGER);
$stmt->bindValue(':status', self::STATUS_OK, SQLITE3_INTEGER);
$stmt->bindValue(':invite', self::STATUS_INVITE, SQLITE3_INTEGER);
$stmt->bindValue(':player', $playerName, SQLITE3_TEXT);
return $stmt->execute();
}
[WARNING] RuntimeException: "SQLite3::prepare(): Unable to prepare statement: 1, near "LIMIT": syntax error" (E_WARNING) in "src/Clan.php" at line 74
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question