modification pour afficher user par pseudo et non par id
This commit is contained in:
parent
190554d966
commit
b11f67793a
9 changed files with 47 additions and 25 deletions
|
|
@ -162,4 +162,15 @@
|
|||
|
||||
return $prep->fetch();
|
||||
}
|
||||
|
||||
public function findUserByPseudo(string $strPseudo): array|bool {
|
||||
|
||||
$strRq = "SELECT * FROM users WHERE user_pseudo = :pseudo";
|
||||
|
||||
$prep = $this->_db->prepare($strRq);
|
||||
$prep->bindValue(':pseudo', $strPseudo, PDO::PARAM_STR);
|
||||
$prep->execute();
|
||||
|
||||
return $prep->fetch();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue