Skip to content

Commit

Permalink
Update Database.php
Browse files Browse the repository at this point in the history
  • Loading branch information
jannisnikoy committed May 2, 2024
1 parent 5b601bf commit 9e78e21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function query(string $sql): array {

$this->statement->execute();

if (stripos($sql, 'SELECT') === 0) {
if (strtoupper(substr(ltrim($sql), 0, 6)) === "SELECT") {
$this->result = $this->statement->fetchAll(\PDO::FETCH_OBJ);
return $this->result;
} else {
Expand Down

0 comments on commit 9e78e21

Please sign in to comment.