Skip to content

Commit

Permalink
Fixed player log reading
Browse files Browse the repository at this point in the history
  • Loading branch information
TemirkhanN committed Sep 5, 2023
1 parent 737abda commit f36fbae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Player/PlayerLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function add(int $characterId, string $log): void
public function readLogs(int $characterId, int $amount): iterable
{
$logs = $this->db
->fetchRows('SELECT message FROM log WHERE id=? ORDER BY tid DESC LIMIT ?', [$characterId, $amount]);
->fetchRows('SELECT message FROM log WHERE character_id=? ORDER BY tid DESC LIMIT ?', [$characterId, $amount]);

foreach ($logs as $log) {
yield $log['message'];
Expand Down

0 comments on commit f36fbae

Please sign in to comment.