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:
parent
808f52765c
commit
ad7d229daf
8 changed files with 10 additions and 10 deletions
|
|
@ -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]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue