1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-05-07 01:04:03 +00:00

Use parameter binding in SELECT queries

This commit is contained in:
lukinovec 2026-04-29 10:21:47 +02:00
parent 808f52765c
commit ad7d229daf
8 changed files with 10 additions and 10 deletions

View file

@ -77,6 +77,6 @@ trait ManagesPostgresUsers
public function userExists(string $username): bool
{
return (bool) $this->connection()->select("SELECT usename FROM pg_user WHERE usename = '{$username}'");
return (bool) $this->connection()->select("SELECT usename FROM pg_user WHERE usename = ?", [$username]);
}
}